Skip to content
Merged
Binary file added docs/_static/images-test/examples.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/images-test/images-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions docs/classic-ui/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,62 @@ The possible options for `mode` are listed below, where the default option is `s

Deprecated option names: `scale-crop-to-fill`, `up`.

### Images Test Rendering

Plone's Classic UI includes special demonstration views that render ready-made examples of image handling and responsive image components using your site's active theme. These views help developers verify image scaling, srcset generation, and explore available image optimization patterns. These views work on image content types (e.g., images or documents with images).

Append the view name `/@@images-test` to an image URL, optionally followed by an anchor like `#srcset` for specific sections.

````{card}
```{image} /_static/images-test/images-test.png
:alt: Images Test
:target: /_static/images-test/images-test.png
```
+++
_Images Test_
````
Example: `https://classic.demo.plone.org/en/demo/an-image.jpg/@@images-test#srcset`

It displays the following examples (all rendered with the current theme’s styling):

Standard image scales
: Shows the Classic UI Plone scales with different modes:
- Mini
- Mini mode=cover
- Mini mode=contain

````{card}
```{image} /_static/images-test/examples.png
:alt: Example
:target: /_static/images-test/examples.png
```
+++
_Example_
````

Picture tags (Plone 6+ only)
: Demonstrates the use of `<picture>` elements with configured picture variants.
If the site runs on Plone 5.2 or earlier, a regular `<img>` tag is rendered instead.

Picture Tag Large
: uses the configured `large` picture variant

Picture Tag Medium
: uses the `medium` variant with multiple `<source>` elements and media queries for art direction

Picture Tag Small
: uses the `small` variant

Picture Tag Small with title/alt
: same as the previous, but with `title` and `alt` attributes explicitly set

`img` with `srcset` attributes
: Shows how to use Plone’s `@@images` view to generate a full responsive `<img>` tag with a complete `srcset`.
The browser automatically selects the most appropriate scale based on the available space and device pixel ratio.
The example includes the required `sizes` attribute and demonstrates the resulting HTML output.

This view is especially valuable for theme developers who need to verify that responsive images, picture variants, and srcset functionality are correctly styled and behave as expected across devices and Plone versions.


(classic-ui-images-permissions-label)=

Expand Down