Skip to content

Commit

Permalink
Update retina example
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Sep 4, 2024
1 parent c9ea0b5 commit e825203
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions docs/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,13 @@ This could be:
) }}
```

Retina example
Retina example:

```twig
<picture>
<source media="(max-width: 1024px)"
srcset="/uploads/media/sulu-400x400/01/image.jpg?v=1-0 1024w, /uploads/media/sulu-170x170/01/image.jpg?v=1-0 800w, /uploads/media/sulu-100x100/01/image.jpg?v=1-0 460w"
sizes="(max-width: 1024px) 100vw, (max-width: 800px) 100vw, 100vw">
<source media="(max-width: 650px)"
srcset="/uploads/media/sulu-400x400/01/image.jpg?v=1-0 1024w, /uploads/media/sulu-170x170/01/image.jpg?v=1-0 800w, /uploads/media/sulu-100x100/01/image.jpg?v=1-0 460w"
sizes="(max-width: 1024px) 100vw, (max-width: 800px) 100vw, 100vw">
<img alt="Title"
title="Description"
src="/uploads/media/sulu-400x400/01/image.jpg?v=1-0"
class="image-class">
</picture>
<img alt="Title"
title="Description"
src="/uploads/media/452x452/01/image.jpg?v=1-0"
srcset="/uploads/media/452x452/01/image.jpg?v=1-0 1x, /uploads/media/452x452@2x/01/image.jpg?v=1-0 2x">
```

This could be:
Expand Down

0 comments on commit e825203

Please sign in to comment.