Block that changes image based on screen size?
-
I made a page (linked) with some custom code (using CSS) that displays different images based on resolution. On desktop it displays a 16:9 (aspect ratio)-image and on mobile it’s 9:16. This was done in Classic editor and it’s a ugly hack, as I added both images and uses “display:none” based on breakpoints in CSS.
Ideally this should be done using src-set instead, but that requires either hardcoding the whole thing in html, or some nifty plugin that does the job for me. The last option would be preferable:
Has anyone made a block that allows me to display different images based on screen resolution?The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Block that changes image based on screen size?’ is closed to new replies.