imagify-plugin icon indicating copy to clipboard operation
imagify-plugin copied to clipboard

Auto-optimization on image upload doesn't optimize thumbnails

Open Screenfeed opened this issue 5 years ago • 8 comments

Probably due to a new change in the upload process, only the full size (+ webp) is optimized automatically. The media then displays a "Optimize X missing thumbnails" link. I was able to follow the lead to some point:

Imagify_Auto_Optimization->do_auto_optimization()
=> Imagify\Optimization\Process\AbstractProcess->optimize()
=> Imagify\Media\WP->get_media_files()
=> wp_get_attachment_metadata()

This final wp_get_attachment_metadata() returns an empty string instead of the full meta data (as it should, since it is supposed to be ran after the upload is complete).

Related ticket.

Screenfeed avatar Apr 30 '20 15:04 Screenfeed

@Screenfeed Thanks for the report. Could you please work on priority on this bug?

GeekPress avatar Apr 30 '20 20:04 GeekPress

@GeekPress On it 👍

Screenfeed avatar May 04 '20 13:05 Screenfeed

@Screenfeed Thanks 🙏

GeekPress avatar May 04 '20 13:05 GeekPress

@hellofromtonya This is fixed in #494 and I tested it manually. Automated tests won't be a piece of cake though. Any thoughts about how to proceed?

Screenfeed avatar May 06 '20 15:05 Screenfeed

@Screenfeed I'd suggest the following:

  1. Have our Dev QA team test it out on MEGA or somewhere.
  2. Have Marko add the changes to customer websites to validate it works.

We can add tests later. Why later? I know that it's tough to test Imagify now. We'll fix that later and make Imagify testable.

Sound good?

hellofromtonya avatar May 06 '20 18:05 hellofromtonya

@hellofromtonya It sounds like a good plan to me. Thanks.

Screenfeed avatar May 06 '20 21:05 Screenfeed

Apparently this may still be a problem, as we have a customer reporting that the fix contained in the 1.9.10 release is not solving the issue for him.

Reopening and tagging for more info.

iCaspar avatar Mar 03 '21 17:03 iCaspar

I can maybe reproduce this, in the case where there are image thumbnail sizes defined with a 0 dimension, like Screen Shot 2021-12-06 at 3 28 30 PM Screen Shot 2021-12-06 at 3 28 20 PM

Image thumbnails seem to be generated in square dimensions (0 dimension same as given dimension): Screen Shot 2021-12-06 at 3 27 31 PM

There appear to be 3 unoptimized thumbnail sizes (presumably corresponding to the 3 sizes with a 0 dimension: Screen Shot 2021-12-06 at 3 27 02 PM

But this occurs only for the single (in this case woocommerce placeholder) image. Other images do not show as missing the unoptimized thumbnails.

One might suspect that it's because the woocommerce image was not uploaded via the media uploader, rather installed with woo, and in this case, restoring the original image and re-optimizing clears the missing thumbnails message. In which case, it's not to do with auto-optimizing as it is with the image being uploaded in a "non-standard" manner.

iCaspar avatar Dec 06 '21 20:12 iCaspar