Nuxt Image has first class integration with Cloudimage
Integration between Cloudimage and the image module.
To use this provider you just need to specify the token of your project in cloudimage.
export default { image: { cloudimage: { token: 'demo' } }}
Note: Current integration uses API v7
.
You can override default options:
token
demo
Your Cloudimage customer token. register for a Cloudimage account to get one. The subscription takes less than a minute and is totally free.
baseURL
Your uploads base URL. This alows to shorten your origin image URLs.
export default { image: { cloudimage: { token: 'demo', baseURL: 'sample.li' // optional } }}
cdnURL
https://{token}.cloudimg.io/v7
Beside the standard modifiers, also you can pass Cloudimage-specific Cloudimage-specific transformation params to modifiers
prop.
fit
valuesBeside the standard values for fit
property of Nuxt image and Nuxt picture, Cloudimage offers the following for extra resizing params:
crop
- Crops the image to specified dimensions (width and height) and keeps proportions.face
- Crops the image automatically keeping the most prominent face.fit
- Resizes the image to fit into a specified width and height box, adds padding (image or solid colour) to keep proportions.cropfit
- Sets crop or fit resize mode depending on the origin and the desired dimensions.bound
- Resizes to a given width and height box and keeps proportions. Similar to fit but without adding padding.boundmin
- Resizes an image while bounding the smaller dimension to the desired width or height while keeping proportions.