An open API service indexing awesome lists of open source software.

https://github.com/openweb-nl/hippo-dynamic-images

Module for Hippo CMS for working with image variants
https://github.com/openweb-nl/hippo-dynamic-images

Last synced: 7 months ago
JSON representation

Module for Hippo CMS for working with image variants

Awesome Lists containing this project

README

          

# Dynamic Images

This plugin is designed to easy image handling in Hippo CMS or Bloomreach Experience.

Tired of defining 30+ variants on your imageset? Tired of all the work to make a variant 1px wider? Are your editors tired of scaling and cropping all the variants of all images?

With this plugin image sizes are defined in the view template and variants are generated on-the-fly when a link to the variant is created.

## Installation
1. Add dependency to pom.xml
```xml

nl.openweb.hippo
dynamic-images
0.01.00-SNAPSHOT


org.onehippo.cms7
hippo-cms-gallery-frontend

```

2. Add a Spring configuration file in hst-assembly/overrides.
```xml





```
As you can see it's possible to customize the timeout and the various classes. Also the ScalingGalleryProcessor can be overwritten and set with Spring configuration on the VariantStrategy.

3. Add taglib for JSP
```
<%@ taglib prefix="dynimg" uri="http://www.openweb.nl/hippo/dynamicimages/taglib" %>
```
Or import taglib for use in Freemarker webfiles
```
<#assign dynimg=JspTaglibs["http://www.openweb.nl/hippo/dynamicimages/taglib"] >
```

4. Add group _sitewriters_ to domain _hippogallery_

Add value `sitewriters` to property `hipposys:groups` at path=/hippo:configuration/hippo:domains/hippogallery/hippo:authrole

## Usage

Instead of using `

the scaling properties are configured in the configuration.

With Dynamic Images the scaling is configured in the view (JSP or Freemarker template).
To generate the URL you can now use

``

The original image will be scaled and cropped to the requested width and height.
By leaving the height unspecified an image is only scaled to the requested width.

``