Cockpit Image Styles Picture
Archived Project

Cockpit Image Styles

This Add-On is for version 1 of Cockpit and is no longer maintained.

This addon extends Cockpit CMS core functionality by introducing the possibility to define image styles that can be assigned to image fields. Cockpit provides a simple mechanism to transform images where its possible by invoking the endpoint to apply a set of transformations (e.g resize, blur, etc..) to an existing image. However, using such mechanism can be painful since it requires for each image a new request.

Taking into consideration similar concepts from other CMS's, where its possible to encapsulate those transformations in a single entity and therefore apply it automatically to all images present in a collection, this addon provides:

  • Admin interface to configure the Image Styles

  • REST endpoint to apply the image style to an image

  • Generation of all image styles when saving a collection

  • No 3rd party dependencies, everything is based on the Cockpit API

Download and installation instructions on github