When using Stage File Proxy, the image width and height attributes are not available. This causes fatal errors when using the Responsive Image field formatter from Acquia DAM.
There are several potential solutions that are being worked on for this:
* Stage File Proxy is working on a major overhaul to implement a stream wrapper that could resolve this (https://www.drupal.org/project/stage_file_proxy/issues/2922292 and https://www.drupal.org/project/stage_file_proxy/issues/2928564)
* There is a Core patch to suppress the error in responsive images, but this just sends the error to the log and still causes downstream issues when the width/height is needed (https://www.drupal.org/node/2827921)
As a temporary workaround, just using a dummy width/height when the image attributes are not available fixes the problem.
This is not an ideal solution, but a patch is provided here for sites that might need it. This is for the 1.0.x branch and might need a reroll for the 1.1 branch. But the 1.1 branch had some additional errors that might also be related to stage_file_proxy that I didn't have time to track down, so we are staying at the 1.0 version for now.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3496774-2.patch | 787 bytes | mpotter |
Issue fork acquia_dam-3496774
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
mpotter commentedComment #5
shivam_tiwari commentedComment #6
kul.pratap commentedIt's working fine for me.
Moving this to RTBC.
Comment #10
japerryFixed. I don't like it either, but eh its fine. Needs to be brought into 1.1.