Incomplete Image Links in Critical CSS Optimization
ID: 1965M3rMbB30pTOCiMMxXj
Backlog
Published on 10/2/2024
•
Last update on 10/2/2024
Summary
When the critical CSS optimization feature is enabled in Store Framework stores, image links added via CSS are inserted with only the path (path) and not the full URL. This can lead to 404 errors when attempting to access these links through the site's URL.
Simulation
- Access a store that uses the Store Framework.
- Enable the critical CSS optimization feature in the settings.
- Add images via CSS using full links.
- Check the generated CSS file and observe that image links appear only with the path, lacking the complete domain.
Workaround
Currently, there is no workaround for this bug. It is recommended to avoid using images via CSS due to several reasons, including SEO implications and accessibility concerns. Instead, users should add images using image blocks. For icons, it’s advisable to use the method provided here to ensure proper rendering and SEO compliance.