Skip to content

Image Overlays

With the CldImage component, you can easily place an image onto an existing image with overlays.

Example

Chef in a kitchen with image overlay
import { CldImage } from 'astro-cloudinary';
<CldImage
src="<Public ID>"
width="<Width>"
height="<Height>"
overlays={[{
publicId: "<Public ID>",
position: {
x: 50,
y: 50,
gravity: 'north_east',
},
effects: [{
crop: 'fill',
width: 350,
height: 350,
gravity: 'auto',
border: '5px_solid_yellow'
}]
}]}
alt=""
sizes="100vw"
/>

Learn More