Image Style Action plugin for image files

Created on 28 February 2025, 12 days ago

Problem/Motivation

It seems there is no Action plugin to use Image Style for image files entities.
It could be a handful tool for Recipes and maybe for Drupal CMS with an ECA model.
As it will provide solution to:
- Optimize existing images files.
- Optimize new images files - create them "optimized".

Steps to reproduce

- "Try to create or update images files based on image style with an action" - without custom code.

Proposed resolution

Within Content Translation module
- Image File Action Deriver
- Configurable Action Plugin for using Image Style for Image Files
-- Image Style - the image style to be used for this action.
-- Others if needed - ex. update/override if translation exists, unpublish option ... etc
- Tests

Remaining tasks

- All above

User interface changes

- No changes if the Actions are not "configured"

Introduced terminology

- (File) Image Style Action

API changes

- This will not change the existing API, but uses the existing API to bring the new Action plugin.

Data model changes

--

Release notes snippet

--

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component

image.module

Created by

πŸ‡·πŸ‡΄Romania vasike Ramnicu Valcea

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

Merge Requests

Comments & Activities

  • Issue created by @vasike
  • Pipeline finished with Failed
    11 days ago
    Total: 112s
    #437101
  • Pipeline finished with Success
    11 days ago
    Total: 385s
    #437109
  • πŸ‡·πŸ‡΄Romania vasike Ramnicu Valcea

    MR available - first attempt

    For start:
    - What's not clear?
    - What's missing?
    - Naming (for classes/action) - this big one topic
    - What's next

  • πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

    It looks to me that this action plugin replaces the existing image, instead of generating a derivative image?

    That's not what I'm looking for -- I want to just generate the derivative image. For content created programmatically, the derivative images don't exist until somebody visits a page that renders the specific image style you want. When posting images to social media, you might have an image style that isn't rendered when you want to send that image, and this can cause errors/failed posts.

  • πŸ‡©πŸ‡ͺGermany IT-Cru Munich

    Current MR state would replace original image with generated image style, which could be critical:

    • People maybe need original image for better quality or bigger dimensions
    • When wrong image style is used via plugin you could not revert this change
    • When plugin is applied multiple time on same image quality could reduced when reducing filter quality effects are included in selected image style
  • Pipeline finished with Canceled
    11 days ago
    Total: 98s
    #437551
  • Pipeline finished with Failed
    11 days ago
    Total: 158s
    #437552
  • Pipeline finished with Success
    11 days ago
    Total: 818s
    #437553
  • πŸ‡·πŸ‡΄Romania vasike Ramnicu Valcea
  • Pipeline finished with Success
    10 days ago
    Total: 819s
    #437673
  • Pipeline finished with Success
    9 days ago
    Total: 779s
    #437999
  • πŸ‡·πŸ‡΄Romania vasike Ramnicu Valcea

    Updates on the MR and issue summary ... support for generate Derivatives ...

    p.s. there could be issues for action access because of file access issues like
    https://www.drupal.org/project/drupal/issues/3450005 πŸ› File entity update is allowed only for user who has uploaded the file Active

  • Pipeline finished with Success
    9 days ago
    Total: 458s
    #438663
  • Pipeline finished with Success
    9 days ago
    Total: 1000s
    #438682
Production build 0.71.5 2024