-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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](https://github.com/dachcom-digital/pimcore-toolbox/blob/master/src/ToolboxBundle/Resources/config/pimcore/image_thumbnails.yml). | ||
So it's easy for you to simplify or change the [Image Thumbnail](https://www.pimcore.org/docs/5.0.0/Assets/Working_with_Thumbnails/Image_Thumbnails.html) reference. | ||
|
||
Although this is just an optional feature, it makes sense to use the view helper in your project and custom bricks. | ||
|
||
## Configuration | ||
|
||
```yaml | ||
toolbox: | ||
image_thumbnails: | ||
# get merged or overrides the toolbox defaults | ||
gallery_element: 'myOverriddenGalleryThumbnailSize' | ||
my_thumbnail_size: 'myThumbnailSize' | ||
``` | ||
## View Helper: | ||
```twig | ||
{{ asset.getThumbnail(toolbox_get_image_thumbnail('my_thumbnail_size')) }} | ||
``` |