yireo / Yireo_NextGenImages

44 stars 26 forks source link

Ajax response plugin gets incorrect gallery images #55

Closed joe-vortex closed 1 year ago

joe-vortex commented 1 year ago

Issue

Webp urls in the gallery object get created from the base image instead of the gallery object

https://github.com/yireo/Yireo_NextGenImages/blob/6083e16f43150b7ce12983c8adf53a05f4ef9d91/Plugin/CorrectImagesInAjaxResponse.php#L81

This should be:

$images = $this->imageCollector->collect($galleryImages[$type]);

This ensures the correct file is used in the webp version of the gallery file, otherwise all gallery webps are the same as the base image.

jissereitsma commented 1 year ago

Good catch. I've included this fix in version 0.3.15 which I just released.

jissereitsma commented 1 year ago

https://github.com/yireo/Yireo_NextGenImages/commit/e5a8e49f30d7d91ed5cb839d843d321deb2a2356