Remove duplicate image validation

Created on 29 December 2022, almost 2 years ago
Updated 3 May 2023, over 1 year ago

Problem/Motivation

I'm trying to warm all image styles for 20 000+ images and it's really slow. Part of the reason why it's slow is because the same image validation is being run multiple times for every image.

I noticed $image->isValid() is being run three times: once in addQueue(), once in doWarmUp() and once in $style->createDerivative(). The file extension validation is also being covered by $image->isValid(), so no need to run it again.

Proposed resolution

Since \Drupal\image_style_warmer\ImageStylesWarmerInterface::validateImage is both unnecessary and an implementation detail (shouldn't be part of the public API), I propose marking it as deprecated and removing all internal usage.

📌 Task
Status

Fixed

Version

1.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