Image URLs from file loader no longer have asset prefix in 5.3.3 #37427
Labels
status: confirmed
Issue with steps to reproduce the bug that’s been verified by at least one reviewer.
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
Between Gatsby 5.3.2 and 5.3.3, image URLs generated by the file loader no longer include any configured asset prefix, e.g. the
src
URL for the following:When built with
gatsby build --prefix-paths
andassetPrefix
set tohttps://assets.example.com
ingatsby-config.js
should be prefixed with https://assets.example.com.This seems to be caused by f448e12 as removing that change causes the asset prefix to be reinstated.
Reproduction Link
https://github.com/ghostcassette/gatsby-asset-prefix
Steps to Reproduce
import
an image in a React component and use it in animg
tag, e.g.assetPrefix
tohttps://assets.example.com
ingatsby-config.js
gatsby build --prefix-paths
Expected Result
The image URL should be prefixed with the asset prefix, e.g.
https://assets.example.com/static/icon-decafbad.png
Actual Result
The image was not prefixed with the asset prefix but was relative to the current hostname, e.g.
/static/icon-decafbad.png
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: