Das, welches ich als wählbares Profil unter Themes › Nightwing › Bildgrößen anlegen kann.
Ich dachte, die vordefinierte Größe in der YAML macht genau das, nur ohne es dort einzutragen?
ToM
Druckbare Version
Das, welches ich als wählbares Profil unter Themes › Nightwing › Bildgrößen anlegen kann.
Ich dachte, die vordefinierte Größe in der YAML macht genau das, nur ohne es dort einzutragen?
ToM
Ah, jetzt weiß ich was du meinst. Ja das geht mitCode:contao.image.sizes.*.lazy_loading: true
Danke!
Sehe ich das richtig, das die Wildcard (*) dann für alle Profile gilt?
ToMCode:# This allows to define image sizes directly in the configuration in addition to the Contao back end (tl_image_size table).
sizes:
lightbox_crop:
width: 1280
height: 1024
lazy_loading: true
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '1x, 2x'
formats:
jpg: ['webp', 'jpg']
jpeg: ['webp', 'jpeg']
png: ['webp', 'png']
items:
-
width: 1024
height: 768
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '0.5x, 2x'
sizes: '100vw'
media: '(max-width: 900px)'
-
width: 512
height: 384
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '0.5x, 2x'
sizes: '50vw'
media: '(max-width: 500px)'
big_crop:
width: 300
height: 200
lazy_loading: true
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '1x, 2x'
formats:
jpg: ['webp', 'jpg']
jpeg: ['webp', 'jpeg']
png: ['webp', 'png']
items:
-
width: 150
height: 100
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '0.5x, 2x'
sizes: '100vw'
media: '(max-width: 900px)'
-
width: 50
height: 50
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '0.5x, 2x'
sizes: '50vw'
media: '(max-width: 500px)'
middle_crop:
width: 200
height: 200
lazy_loading: true
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '1x, 2x'
formats:
jpg: ['webp', 'jpg']
jpeg: ['webp', 'jpeg']
png: ['webp', 'png']
items:
-
width: 100
height: 100
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '0.5x, 2x'
sizes: '100vw'
media: '(max-width: 900px)'
-
width: 50
height: 50
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '0.5x, 2x'
sizes: '50vw'
media: '(max-width: 500px)'
small_crop:
width: 200
height: 100
lazy_loading: true
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '1x, 2x'
sizes: '100vw'
formats:
jpg: ['webp', 'jpg']
jpeg: ['webp', 'jpeg']
png: ['webp', 'png']
items:
-
width: 50
height: 50
resizeMode: 'crop' # One of "crop"; "box"; "proportional"
zoom: 50
densities: '0.5x, 2x'
sizes: '50vw'
media: '(max-width: 900px)'
PS: Ich nehme mal, das wird in den Docs alles mal aktualisiert, je nach Zeit von Euch?
Das kannst du nicht 1:1 so verwenden, das ist nur stellvertretend für die jeweilige Bildgröße.
https://docs.contao.org/dev/reference/config/;)Code:vendor/bin/contao-console config:dump-reference contao
Danke, habs mal im obigen Beispiel aktualisiert. Passts denn?
Scherzkeks, ohne SSH Zugang... :cool::D
Ich hab all-inkl PrivatePlus
Oder hast mir da einen Würgaround per Datei?
ToM