Problem/Motivation
getimagesize() calls are made to determine the dimensions of images, to be used eg. in calculations in image operations. When using remote file storages, every getimagesize() call results in the overhead + the cost of a network request to the external service.
Because of this, we want to avoid these calls. We're already doing that by overriding some of the image operations, but the dimensions are still accessed in validation and sometimes in the image widget. To make sure we're only doing this call once we could add a caching mechanism for image dimensions, keyed by the file URI.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork imgix-3257563
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dieterholvoet commentedWe could use https://www.drupal.org/project/file_mdm for this, the imagemagick module does the same.
Comment #4
dieterholvoet commentedTested this on one of my sites, + this approach is also being used in the Bunny Optimizer module. @RobinHoutevelts, can you let me know you approve of this approach and maybe test it on one of your sites?
Comment #6
dieterholvoet commentedComment #8
dieterholvoet commented