spacecatninja / craft-imager-x

Image transforms, optimizations and manipulations for your Craft CMS site.
Other
26 stars 16 forks source link

Autogeneration from Imager-x Utility only targets volumes not elements or fields? #252

Closed A1Allan closed 8 months ago

A1Allan commented 9 months ago

Hi,

I encountered a behavior that feels like a bug, but it may be my misunderstanding... in which case I'd like to put in a feature request for it to work this way. When I do a mass Generate Transforms it doesn't use any of the precision of the defined elements or fields. Even if I choose the manual version, it's still applying a transform to a whole volume.

image

I want to be able to kick off a generation of all transforms for assets used in entries based on the Elements and Fields setup.

I'm submitting a...

Steps to reproduce

  1. Create imager-x-transforms
  2. Target specific transforms and fields using imager-x-generate
  3. Use the cms to generate transforms

Description

Actual behavior - only the 'volumes' will be used Desired behavior - Use the 'elements' and 'fields' to target images for transformation

Displayed errors, stack trace, relevant logs

No errors

Additional info

Imager version & edition 4.2.4 PRO Imager transformer craft Craft version & edition 4.7.0 PRO PHP version 8.0.30 Image driver & version Imagick 3.7.0 (ImageMagick 6.9.11-60) Image driver supported formats jpg, jpeg, gif, png, webp, avif, heic Custom encoders No custom encoders configured. Enabled external storages No external storage configured. Enabled optimizers jpegtran, optipng, gifsicle

aelvan commented 9 months ago

Hi,

Yes, the control panel utility is only able to generate transforms based on volumes. To generate based on the elements and fields setup, you essentially need to trigger a resave of those elements, which is easiest done via Crafts built-in console command: ./craft resave/entries --section=mySection.