You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/classic-ui/images.md
+80Lines changed: 80 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -247,3 +247,83 @@ Other options are:
247
247
248
248
The `ImageScaling` view explicitly checks the permissions of the current user.
249
249
To access image scales, which are normally not accessible to the current user, override the `validate_access` method in `plone.namedfile.scaling.ImageScale`.
250
+
251
+
252
+
## `srcset` configuration
253
+
254
+
In `/@@imaging-controlpanel` Plone allows you to define HTML {term}`srcset` attributes.
255
+
A `srcset` can help the browser serve the best fitting image for the current users situation.
256
+
Which image scale is best for the user can be decided on different metrics.
257
+
258
+
259
+
### viewport size
260
+
261
+
The first is metric would be the viewport size.
262
+
263
+
```json
264
+
{
265
+
"scale": "large",
266
+
"media": "(max-width:800px)"
267
+
},
268
+
{
269
+
"scale": "larger"
270
+
}
271
+
```
272
+
273
+
With this definition the browser will use the `large` scale when the viewport's width is 800 pixels or fewer.
274
+
When the viewport width is greater than 800 pixels, the browser will use the larger scale `1000px`.
275
+
276
+
277
+
### Pixel density
278
+
279
+
Another metric is the pixel density of the user's screen.
280
+
This metric denotes the pixel density, or resolution, of an output device in {term}`dots per inch` (DPI).
Copy file name to clipboardExpand all lines: docs/glossary.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -268,4 +268,21 @@ fence
268
268
Open Graph
269
269
The [Open Graph protocol](https://ogp.me/) enables any web page to become a rich object in a social graph.
270
270
For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.
271
+
272
+
srcset
273
+
The [`HTMLImageElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement) property `srcset` is a string which identifies one or more image candidate strings, separated using commas `,`.
274
+
Each image candidate string specifies image resources to display in web pages under given circumstances.
0 commit comments