Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Correct Formatting for Media Queries in Images

Started by Muut Archive 10 years ago · 1 replies · 641 views
10 years ago

I'm trying to setup media queries in a markdown image insert. I tried following the docs:

https://learn.getgrav.org/content/media

But this doesn't work for me at all... What is the correct syntax for this? Say if I wanted large format screens at 25vw, normal size screens at 50vw and mobile screens at 100vw.

Thanks in advance!!

10 years ago

I think the docs-page might be messing up the code slightly, the %XX parts of that piece should not be encoded as URL entities. The example should render as ![](retina.jpg?sizes=(max-width:26em) 100vw, 50vw).

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2964 9 years ago
Archive · by Muut Archive, 9 years ago
2 1923 9 years ago
Archive · by Muut Archive, 9 years ago
2 5260 9 years ago
Archive · by Muut Archive, 9 years ago
1 4074 9 years ago
Archive · by Muut Archive, 9 years ago
3 2014 9 years ago