nystudio107 / craft-imageoptimize

Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like Imgix, with zero template changes.
https://nystudio107.com/plugins/imageoptimize
Other
235 stars 36 forks source link

Progressive JPGs / Imgix Not Transforming #107

Closed AdamChlan closed 6 years ago

AdamChlan commented 6 years ago

I was wondering if there is a limitation within the plugin that does not allow Progressive JGPs (pjpg) format from Imgix to be transformed/resized.

I'm noticing that I have some images where transforms are not being created, and these images all seem to be returning the pjpg format in my Imgix URL string. I have the format set to auto.

Here is a screenshot of what I am seeing for these images.

screenshot 2018-09-17 13 04 14
khalwat commented 6 years ago

hmmmmm. It should be able to... this is how it handles interlaced images:

                // Handle interlaced images
                if (property_exists($transform, 'interlace')) {
                    if (($transform->interlace != 'none')
                        && (!empty($params['fm']))
                        && ($params['fm'] == 'jpg')
                    ) {
                        $params['fm'] = 'pjpg';
                    }
                }
khalwat commented 6 years ago

How can I attempt to replicate this?

MikeMcChillin commented 6 years ago

Also running into issues using Imgix with v 1.4.38. In my case, all images show "image would be upscaled" even if they are large enough to transform without upscaling. Downgrading to 1.4.36 fixes for me (fix found via #103). To reproduce issues, I had the following settings:

General Settings:

ImageOptim Field Settings:

screen shot 2018-09-25 at 3 24 24 pm ^ Image is 5000px wide, trying to be transformed into 704px with retina checked.

khalwat commented 6 years ago

Can you try downgrading to 1.4.37 and see if that's still working for you? Trying to narrow this down, @AdamChlan

khalwat commented 6 years ago

This regression should be fixed in 1.4.39, give it a whirl -> https://github.com/nystudio107/craft-imageoptimize/releases/tag/1.4.39

MikeMcChillin commented 6 years ago

Just here to confirm the 1.439 release fixed my issue. Thank you!

AdamChlan commented 6 years ago

I'll be testing a bit later this week, and will report back.

khalwat commented 6 years ago

Cool @AdamChlan lmk!

AdamChlan commented 6 years ago

Finally got around to updating, and this indeed fixed the issue. Thank you!

khalwat commented 6 years ago

Thanks for letting me know!