Problem/Motivation
URLs to image files are cached including the domain. In a multidomain environment, this causes unnecessary redirects, that can also fail if SSL is enabled on one domain and not the other.
Proposed resolution
The Problem could probably be resolved by serving the picture source sets as root-relative paths (e.g. /some/path/image.png) instead of absolute URLs (e.g. https://cached-domain.com/some/path/image.png). The source of the problem is located in the pagedesigner_responsive_images module, where the twig extension function styled_image_url() which is being called from the responsive-image.html.twig in the iq_barrio theme returns a absolute URL in the getStyledImageUrl() function in ResponsiveImageStylesTwigExtension.php.
There is a core issue on the topic of ImageStyle::buildUrl() returning absolute URLs instead of root-relative paths here. And in there is also a solution: you could call file_url_transform_relative() on the absolute URL before returning (will be deprecated in D10, see here).
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork pagedesigner_responsive_images-3302870
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
pvbergen commentedComment #4
pvbergen commentedComment #7
pvbergen commented