1
0
mirror of https://github.com/danbee/my-images synced 2025-03-04 08:49:05 +00:00
my-images/app/views/images/_image.html.erb
Dan Barber 5b2d1d4d17
Migrate images to Active Storage
Also adds a rake task to do the migration.
2018-11-16 17:16:01 -05:00

18 lines
1.0 KiB
Plaintext

<picture>
<source srcset="<%= url_for image_variant(@image.image, resize: "2000x2000") %>"
media="(min-width: 960px) and (-webkit-min-device-pixel-ratio: 2),
(min-width: 960px) and (min-resolution: 192dpi)">
<source srcset="<%= url_for image_variant(@image.image, resize: "1000x1000") %>"
media="(min-width: 960px)">
<source srcset="<%= url_for image_variant(@image.image, resize: "1400x1400") %>"
media="(min-width: 640px) and (-webkit-min-device-pixel-ratio: 2),
(min-width: 640px) and (min-resolution: 192dpi)">
<source srcset="<%= url_for image_variant(@image.image, resize: "700x700") %>"
media="(min-width: 640px)">
<source srcset="<%= url_for image_variant(@image.image, resize: "960x960") %>"
media="(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi)">
<source srcset="<%= url_for image_variant(@image.image, resize: "480x480") %>">
<img src="<%= url_for image_variant(@image.image, resize: "480x480") %>" itemprop="image">
</picture>