Skip to main content

Image Thumbnails

To stay organized, the ToolboxBundle provides a dedicated configuration and a simple helper for image thumbnails. Every required thumbnail size is defined in the toolbox configuration. So it's easy for you to simplify or change the Image Thumbnail reference.

Although this is just an optional feature, it makes sense to use the view helper in your project and custom bricks.

Configuration

opendxp_toolbox:
image_thumbnails:
# get merged or overrides the toolbox defaults
gallery_element: 'myOverriddenGalleryThumbnailSize'
my_thumbnail_size: 'myThumbnailSize'

View Helper:

{{ asset.getThumbnail(toolbox_get_image_thumbnail('my_thumbnail_size')) }}