Problem/Motivation
Acquia DAM module is rendering SVG images with zero-value width and height attributes, causing them to not display on the front end. Previously, these attributes were not included at all. The customer has confirmed they are not overriding the default module template, which suggests a regression in the module's behavior. This issue is impacting multiple components on the site and is considered a high-priority problem.
Issue fork acquia_dam-3548840
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 #3
rajeshreeputraChange to Image Dimension Handling:
getImageDimensionsmethod no longer immediately returns image property dimensions if found. Instead, it now applies additional logic for original image formats.Note:
In the DAM API, the
widthandheightvalues inimage_propertiesare always0for SVG formats:Recommendation:
To correctly render SVG images, always use an image style other than
originalfor SVG files.Requesting early review.
Comment #4
ankitv18 commentedAs per the comment on the MR by @vishal I agree with him, hence moving back into NW.
Comment #5
rajeshreeputraRequesting review.
Comment #6
japerryIf you end up using original though, you can just not specify a width and height. The code now looks like it'd return null as values on there, which I think isn't what we want.. unless the template or something else interprets that and unsets the key to be included in the embed code.
Comment #7
japerryThis I think is related...
https://www.drupal.org/project/acquia_dam/issues/3550116
Comment #8
rajeshreeputraRequesting review.
Comment #9
japerryIt appears the changes were not tested. Marking NW, It'd be good to verify an SVG is getting the correct embed code.
Comment #10
rajeshreeputraFixed failing test, requesting review.
Comment #12
japerryLooks good. Merged!