The image resize endpoint redirects to the actual image (causes slowness)

Resized images are generated on the fly when a sized image URL is requested and then cached for subsequent requests, there is no background processing job.

A 302 to the original image will occur in the following situations:

  • it’s a file type that can’t be resized (eg, .svg, .gif, .ico)
  • there is no image_sizes config in the active theme’s package.json
  • the requested image size is not present in the image_sizes config
  • the active storage adapter does not support image resizing (it must have a .saveRaw() method)
  • sharp dependency is not installed

Does your theme’s package.json contain an image_sizes config with the sizes that you are requesting? Are you using a custom storage adapter at all? Are you attempting to run a cluster/load balanced system?

1 Like