@ember-responsive-image/cloudinary
Adds a provider helper for ember-responsive-image
for the Cloudinary image CDN.
Compatibility
- Ember.js v4.8 or above
- Embroider or ember-auto-import v2
Installation
ember install @ember-responsive-image/cloudinary
Usage
Please make sure you have read the main documentation first, especially the section on image providers.
This addon provides a {{responsive-image-cloudinary-provider}}
helper for use with the <ResponsiveImage/>
component:
Transformations
Besides the transformations that the addon itself implicitly adds (related to resizing images)
you can add your own Cloudinary transformations by using the
transformations
parameter:
Quality
Use the quality
parameter to pass a custom quality setting
instead of the default auto
:
Image formats
By default, all supported image formats (PNG, JPEG, WEBP, AVIF) are referenced in the generated <source>
tags.
You can tweak that using the formats
argument:
Remote files
The provider supports Cloudinary's fetch
mode to automatically fetch
images from a remote source and deliver them (with optional custom transformations) through Cloudinary's CDN. Simply
pass a fully qualified http(s) URL:
Configuration
You need to specify the cloudName
in your app's config/addons.js
file:
// config/addons.js
'use strict';
module.exports = {
'@ember-responsive-image/cloudinary': {
cloudName: 'my-org',
},
};
License
This project is licensed under the MIT License.