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.

CommentFileSizeAuthor
#2 3496774-2.patch787 bytesmpotter

Issue fork acquia_dam-3496774

Command icon 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

mpotter created an issue. See original summary.

mpotter’s picture

StatusFileSize
new787 bytes

shivam_tiwari made their first commit to this issue’s fork.

shivam_tiwari’s picture

Status: Active » Needs review
kul.pratap’s picture

Status: Needs review » Reviewed & tested by the community

It's working fine for me.
Moving this to RTBC.

rajeshreeputra made their first commit to this issue’s fork.

japerry made their first commit to this issue’s fork.

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Fixed. I don't like it either, but eh its fine. Needs to be brought into 1.1.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.