Download the PHP package legrisch/statamic-graphql-responsive-images without Composer
On this page you can find all versions of the php package legrisch/statamic-graphql-responsive-images. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download legrisch/statamic-graphql-responsive-images
More information about legrisch/statamic-graphql-responsive-images
Files in legrisch/statamic-graphql-responsive-images
Package statamic-graphql-responsive-images
Short Description A Statamic CMS GraphQL Addon that provides a srcset property on AssetInterface queries.
License MIT
Informations about the package statamic-graphql-responsive-images
Statamic GraphQL Responsive Images
Statamic GraphQL Responsive Images is a Statamic addon that provides GraphQL queries for responsive images.
- How to Install
- Setup
- How to Use
- Field
src
- Schema
- Example
- Query
- Response
- Field
srcset
- Schema
- Example
- Query
- Response
- Field
- Notes
- License
How to Install
Setup
This addon can be configured. To publish the configuration run
and see config → statamic → graphql-responsive-images.php for configuration options.
Enable
experimental-cache-management
to automatically clear the Glide cache for images that have been modified, e.g. when the focal point has changed.
How to Use
This addon aims to serve the most typical situation: Statamic is serving an image and you need to implement the image in your frontend. Statamic currently provides no means of using Glide with GraphQL. This addon adds two fields to any AssetInterface
: src
and srcset
.
Field src
Use the field src
to query for single transformed images. All parameters are optional.
Schema
Example
Query
Response
Field srcset
Use the field srcset
to query for ready-to-use srcsets. All parameters are optional.
Schema
Example
Query
Response
Notes
Please be aware that this addon comes with the usual risks of dynamic HTTP based image manipulation.
License
This project is licensed under the MIT License.