Hallo, ich habe schon ziemlich alle Artikel zu cropVariants gelesen und vieles ausprobiert. Meine im Backend ausgewählten cropVarianten werden nicht gerendert. Abhängig vom Viewport werden unterschiedlich große Bilder erzeugt, das funktioniert. Füge ich aber ein cropVariante hinzu, wird das nicht berücksichtigt.
Die Varianten sind in TsConfig angelegt. Zum Rendern habe ich das Image-Partial angepasst. Hier die Dateien:
Hat jemand eine Idee? Außer <f:media… habe ich auch schon diverse Varianten wie ‘picture’ etc ausprobiert, immer das gleiche.
Allerdings zeigt mir debug {_all} auch nirgends einen Wert für cropVariant. Ist das ein Hinweis zur Lösung?
Leider ist in der Doku der Umgang mit den crop-Varianten nicht wirklich erklärt. Wenn ich wie dort gezeigt einfach einen festen Wert für cropVariant code, dann wird das auch gemacht. Die Variante muss aber mit dem Bild geliefert werden.
Or in English…
Hello, I’ve read quite a few articles on cropVariants and tried a lot of things. My cropVariants selected in the backend are not rendered. Depending on the viewport, different sized images are generated, which works. However, if I add a cropVariant, this is not taken into account.
The variants are created in TsConfig. I have adapted the image partial for rendering. Here are the files:
Does anyone have an idea? Apart from <f:media… I have also tried various variants such as etc, always the same.
However, debug {_all} does not show me a value for cropVariant anywhere. Is this a hint for the solution?
Unfortunately, the handling of crop variants is not really explained in the documentation. If I simply code a fixed value for cropVariant as shown there, then this is also done. However, the variant must be supplied with the image.