66 content : Responsive Images - Astro Cloudinary
77---
88import { CldImage } from ' ../../../../../astro-cloudinary' ;
9-
109import CodeBlock from ' ../../../components/CodeBlock.astro' ;
1110import HeaderImage from ' ../../../components/HeaderImage.astro' ;
1211
@@ -47,7 +46,7 @@ application, such as:
4746 33vw"
4847 alt= " <Description>"
4948 / >
50- ```
49+ ```
5150</CodeBlock >
5251
5352This would give you roughly full width images on mobile, a 2-column layout on
@@ -119,22 +118,21 @@ In an example such as:
119118 import { CldImage } from ' astro-cloudinary' ;
120119
121120 < CldImage
122- src= " Public ID>"
121+ src= " < Public ID>"
123122 width= " <Width>"
124123 height= " <Height>"
125124 crop= " fill"
126125 sizes= " 100vw"
127126 alt= " Description"
128127 / >
129- ```
128+ ```
130129</CodeBlock >
131130
132131Each image will be cropped to a 1:1 ratio represented by the width and height provided.
133132
134- As the underlaying Unpic Image component generates an image for each responsive size,
133+ As the underlying Unpic Image component generates an image for each responsive size,
135134Cloudinary will use those sizes when building the URL, for example:
136135
137-
138136``` html
139137<img
140138 alt =" Turtle"
@@ -185,7 +183,7 @@ than a 640x640 image.
185183 import { CldImage } from ' astro-cloudinary' ;
186184
187185 < CldImage
188- src= " Public ID>"
186+ src= " < Public ID>"
189187 width= " <Width>"
190188 height= " <Height>"
191189 crop= " thumb"
@@ -197,7 +195,6 @@ than a 640x640 image.
197195
198196The resulting transformations may look like:
199197
200-
201198``` text
202199.../w_256,h_256,c_thumb/...
203200.../w_384,h_384,c_thumb/...
@@ -257,7 +254,6 @@ values by explicitly setting them.
257254
258255The resulting transformations may look like:
259256
260-
261257``` text
262258.../w_960,h_960,c_thumb/<Other Transformations>/w_256,h_256,c_limit/...
263259.../w_960,h_960,c_thumb/<Other Transformations>/w_384,h_384,c_limit/...
0 commit comments