Images are not resized on import when the image field's maximum resolution is set.

Created on 6 November 2023, 8 months ago
Updated 7 November 2023, 8 months ago

When a maximum resolution is set in the image field settings, and an image is manually uploaded, Drupal automatically resizes it. However, when importing via Feeds, this setting is bypassed. Because I have a feed with photos, and some of them are 10-15MB each (and such a resolution is not needed), the hosting space quickly runs out. Is there a way for the Feeds module to use this setting?

✨ Feature request
Status

Active

Version

3.0

Component

Feeds Import (feature)

Created by

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

Comments & Activities

  • Issue created by @Dodoto
  • πŸ‡³πŸ‡±Netherlands MegaChriz

    We could overwrite the method writeData() in the class \Drupal\feeds\Feeds\Target\Image. That method is responsible for writing the downloaded file to the file system. That method could then check the setting on the image field and then do something similar as file_validate_image_resolution() does to resize the image.

Production build 0.69.0 2024