Performance issues with S3 (or other)

Created on 28 February 2024, 4 months ago
Updated 23 March 2024, 3 months ago

Problem/Motivation

When using a remote file source such as S3, any call for blazy ends up doing an API call to get the image dimensions, with many images on a page (in my case a slick carousel gallery), this can become extremely slow.

The offending call is in BlazyImage::dimensions at:

      // Prevents 404 warning when video thumbnail missing for a reason.
      if ($dimensions = @getimagesize($abs)) {
        [$width, $height] = $dimensions;
      }

Proposed resolution

I'm not sure the inner workings of blazy, but commenting it out didn't have a visible negative affect, so maybe just an option to disable height/width checks for when a user has a remote file system?

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada b_sharpe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024