Deprecate file_validate_image_resolution() and replace with a service

Created on 31 May 2023, about 1 year ago
Updated 1 June 2023, about 1 year ago

Problem/Motivation

file_validate_image_resolution() is a validation hook. Most validation hooks check a value and return an error. However, file_validate_image_resolution() does much more.

It:

  1. scales and image within the min/max dimensions
  2. saves the image
  3. displays status messages to the user

I believe this logic is in the wrong place for an API.

We should:

  • deprecate file_validate_image_resolution()
  • create a ImageResizer service that performs the logic or checking dimensions and resizing
  • Move setting messages to calling code, e.g. in upload form validators.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component
File systemΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

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

Comments & Activities

Production build 0.69.0 2024