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
- Host: GitHub
- URL: https://github.com/openweb-nl/hippo-dynamic-images
- Owner: openweb-nl
- License: apache-2.0
- Created: 2017-11-05T09:13:46.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2022-05-13T14:53:44.000Z (about 4 years ago)
- Last Synced: 2025-01-05T19:25:07.712Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
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.
``