🌐 Website Issue | Use <picture> instead of changing src of <img> #1468
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I made that when we set theme, we change
src
of recommendation<img>
, whichmight seem okay, but Firefox after doing nothing for few minutes, when later
changing theme, it would change image after some time. Chromium from what I
understand, if we also leave it for some time, when changing theme it would
actually take some time to apply theme, which I feel is because of these
<img>
s, I could be wrong here though. Another thing is that it only workswith JavaScript enabled, which I would like to avoid.
So there is
<picture>
tag which we could use to specify few sources so wecould easily change image depending on
@media
, which would allow us to makeit work without JavaScript and probably fix these bugs.
<picture>
on MDN:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture
Good idea!