craft-imageoptimize icon indicating copy to clipboard operation
craft-imageoptimize copied to clipboard

"Cache remote images" option when updating asset indexes causes errors.

Open turnstylerj opened this issue 1 year ago • 0 comments

Describe the bug

I'm not entirely sure this is an ImageOptimize bug/maybe just potential for ImageOptimize to throw a more helpful error message.

I had a couple of large asset volumes (2k-ish images with 5 ImageOptimize variants in their Optimized Images field) using Servd asset storage that weren't able to complete the larger "Optimizing images in x" queue task after updating volume settings. After some debugging, we noticed if we tried to update asset indexes for those volumes, we were getting browser alerts saying "undefined" with 500 errors logging in the browser console from process-indexing-session. ImageOptimize was logging "Resize operation failed."

Servd support suggested I disable the "Cache images remotely" option when reindexing on the hunch it was redundant with ImageOptimize, because it pulls the images separately, and after doing that, the reindex operation completed successfully and all ImageOptimize queue tasks are working.

Seems likely this is a combo of how Servd's Assets and Helpers plugin/asset storage works, but wanted to file an issue for your investigation/thoughts.

To reproduce

Steps to reproduce the behaviour:

  1. Configure an asset volume to use Servd Asset Storage
  2. Reindex assets

Expected behaviour

Assets reindex successfully and queue up relevant ImageOptimize tasks.

Versions

  • Plugin version: 4.0.4
  • Craft version: 4.4.5

turnstylerj avatar Apr 10 '23 19:04 turnstylerj