Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Correct Formatting for Media Queries in Images

Started by Muut Archive 10 years ago · 1 replies · 587 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 2567 9 years ago
Archive · by Muut Archive, 9 years ago
2 1690 9 years ago
Archive · by Muut Archive, 9 years ago
2 4982 9 years ago
Archive · by Muut Archive, 9 years ago
1 3808 9 years ago
Archive · by Muut Archive, 9 years ago
3 1800 9 years ago