Problem/Motivation
This issue is being split from the initial report in https://www.drupal.org/project/media_acquiadam/issues/3270539, which combined this issue and a separate image conversion issue.
Images which are in the DAM with a smaller image size are up-sized by the module to Image Size Limit setting in the configuration form, rather being loaded in their original size. This was not the intent of the module.
Steps to reproduce
- Install and configure the module.
- Select an image asset from the DAM which is smaller that the configured max image size in the module's config form.
- Observe the image is upsized to the configured parameter.
Proposed resolution
When retrieving an image, check the sizes of the source image and take the smallest of a) the configured size limit, b) the size of the largest dimension of the image.
Remaining tasks
Tests needed
User interface changes
Changed text in the description of the size limit field in the config form to be more clear.
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|
Issue fork media_acquiadam-3274796
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
barrett commentedComment #3
barrett commentedComment #6
mglamanFixed tests
Comment #8
mglamanComment #9
cainaruBoth me and @Barrett tested this patch. I tested using a 65x65 asset from the DAM and have successfully verified that it is no longer being upscaled to the configured size in the module's "Image Size Limit" (the 65x65 test asset remains its original size). I've also verified that images that are larger than the configured size in the module's "Image Size Limit" are still scaled down to the configured image size limit as expected.
+1 this looks good to me
Comment #11
mglamanThanks for confirming, merged.