Add caching mechanism for image dimensions

Created on 8 January 2022, almost 3 years ago
Updated 15 November 2023, about 1 year ago

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

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024