I inspect the network tab and see that the image contentType being changed to text/html on build version:
build img
The local yarn start version is fine: start img
My build page for you to inspect: https://faf5-wb-2024--faf5-wb-2024-dt78gouq.web.app/49
And it only happened with that image in some pages (unit 7), all other pages is fine, but i don’t have any code to seperate between units
My img render code:
exerciseKey ? (
<img
src={exerciseKey}
alt="..."
style={{ paddingTop: 25, paddingRight: 10 }}
/>
) : (
<div className="mt-5 d-flex justify-content-center text-info display-3">
Students’ own answers
</div>
)
exerciseKey example: exerciseKey: "img/FriendsPlus/Page49/Key/E1answerKey.png"
I tried npm build, yarn build, deploy on another vps using nginx (currently using firebase), clear build folder before rebuild, build on another pc, add ${process.env.PUBLIC_URL} before img path, but all the same
user26521862 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.