{"id":19288224,"url":"https://github.com/openweb-nl/hippo-dynamic-images","last_synced_at":"2025-11-14T17:05:54.934Z","repository":{"id":26700756,"uuid":"109565537","full_name":"openweb-nl/hippo-dynamic-images","owner":"openweb-nl","description":"Module for Hippo CMS for working with image variants","archived":false,"fork":false,"pushed_at":"2022-05-13T14:53:44.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-01-05T19:25:07.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openweb-nl.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-05T09:13:46.000Z","updated_at":"2022-05-13T11:54:15.000Z","dependencies_parsed_at":"2022-08-09T02:00:04.990Z","dependency_job_id":null,"html_url":"https://github.com/openweb-nl/hippo-dynamic-images","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openweb-nl%2Fhippo-dynamic-images","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openweb-nl%2Fhippo-dynamic-images/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openweb-nl%2Fhippo-dynamic-images/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openweb-nl%2Fhippo-dynamic-images/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openweb-nl","download_url":"https://codeload.github.com/openweb-nl/hippo-dynamic-images/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240392856,"owners_count":19794166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:08:25.405Z","updated_at":"2025-11-14T17:05:49.907Z","avatar_url":"https://github.com/openweb-nl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic Images\n\nThis plugin is designed to easy image handling in Hippo CMS or Bloomreach Experience.\n\nTired 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?\n\nWith 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.\n\n\n\n\n## Installation\n1. Add dependency to pom.xml\n```xml    \n    \u003cdependency\u003e\n      \u003cgroupId\u003enl.openweb.hippo\u003c/groupId\u003e\n      \u003cartifactId\u003edynamic-images\u003c/artifactId\u003e\n      \u003cversion\u003e0.01.00-SNAPSHOT\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.onehippo.cms7\u003c/groupId\u003e\n      \u003cartifactId\u003ehippo-cms-gallery-frontend\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n```\n\n2. Add a Spring configuration file in hst-assembly/overrides.\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cbeans xmlns=\"http://www.springframework.org/schema/beans\"\n       xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n       xsi:schemaLocation=\"\n       http://www.springframework.org/schema/beans\n       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd\"\u003e\n  \u003cbean id=\"nl.openweb.hippo.dynamicimage.strategy.VariantStrategy\"\n        class=\"nl.openweb.hippo.dynamicimage.strategy.CenteredVariantStrategy\"/\u003e\n  \u003cbean id=\"nl.openweb.hippo.dynamicimage.service.VariantService\"\n        class=\"nl.openweb.hippo.dynamicimage.service.DefaultVariantService\"\u003e\n    \u003cproperty name=\"timeoutMilliseconds\" value=\"1000\"/\u003e\n    \u003cproperty name=\"variantStrategy\" ref=\"nl.openweb.hippo.dynamicimage.strategy.VariantStrategy\"/\u003e\n  \u003c/bean\u003e\n\u003c/beans\u003e\n```\nAs 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.\n\n3. Add taglib for JSP\n```\n\u003c%@ taglib prefix=\"dynimg\" uri=\"http://www.openweb.nl/hippo/dynamicimages/taglib\" %\u003e\n```\nOr import taglib for use in Freemarker webfiles\n```\n\u003c#assign dynimg=JspTaglibs[\"http://www.openweb.nl/hippo/dynamicimages/taglib\"] \u003e\n```\n\n4. Add group _sitewriters_ to domain _hippogallery_\n\nAdd value `sitewriters` to property `hipposys:groups` at path=/hippo:configuration/hippo:domains/hippogallery/hippo:authrole\n\n## Usage\n\nInstead of using \u003chst:link to get a link to an image you can now use \u003cdynimg:link to get the link. \ndynimg has three attributes: \n- _imagebean_: an existing variant of type HippoGalleryImageBean (required)\n- _width_: the width of the variant to be linked. Specifying no value of 0 means the original width will be used\n- _height_: the height of the variant to be linked. Specifying no value of 0 means the original height will be used\n\nThe first time the link is created a new variant will be created for you in the repository. \nYou can use any existing variant as a source. Using the original is possible, but it's also possible to define a \nlandscape and portrait variant and reference one of those.\n\n## Examples\n\nIn a default Hippo CMS project a link to an image is generated by using\n\n`\u003chst:link var=\"imageUrl\" hippobean=\"${document.image.homepageBanner}\"/\u003e`\n\nthe scaling properties are configured in the configuration.\n\n\nWith Dynamic Images the scaling is configured in the view (JSP or Freemarker template).\nTo generate the URL you can now use\n\n`\u003cdynimg:link var=\"imageUrl\" imagebean=\"${document.image.original}\" width=\"1312\" height=\"580\"/\u003e`\n\nThe original image will be scaled and cropped to the requested width and height.\nBy leaving the height unspecified an image is only scaled to the requested width.\n\n`\u003cdynimg:link var=\"imageUrl\" imagebean=\"${document.image.original}\" width=\"1312\"/\u003e`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenweb-nl%2Fhippo-dynamic-images","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenweb-nl%2Fhippo-dynamic-images","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenweb-nl%2Fhippo-dynamic-images/lists"}