Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Correct Formatting for Media Queries in Images

Started by Muut Archive 9 years ago · 1 replies · 542 views
9 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!!

9 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 2276 9 years ago
Archive · by Muut Archive, 9 years ago
2 1496 9 years ago
Archive · by Muut Archive, 9 years ago
2 4745 9 years ago
Archive · by Muut Archive, 9 years ago
1 3555 9 years ago
Archive · by Muut Archive, 9 years ago
3 1619 9 years ago