Consumer Image Styles
Categories
Component ID
2906679
Component name
Consumer Image Styles
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
2110
Component created
Component changed
Component body
Consumer Image Styles integrates with JSON API to provide image styles to your images in your decoupled project. Use this module if you need image styles when working with decoupled Drupal using the JSON API module.
When should I use this module
This is a lower budget alternative to services like Cloudinary, Akamai Image Converter, etc. This module will cover your needs in 90% of the decoupled projects.
Usage
- Register your consumer in
/admin/config/services/consumers
. A consumer is something like Marketing Vue.js Site, iOS application, … - Select the image styles from your site applicable to the consumer.
- Identify your JSON API requests according to the documentation in the Consumers project.
The will be a derivatives
section in the meta
for your image files in JSON API. Something like:
…
"meta": {
"derivatives": {
"medium": "http://127.0.0.1:8888/sites/default/files/styles/medium/public/2017-08/generateImage_25f95N.png?itok=LQM1dnmK"
}
}
…