TYPO3 - 使用流体为TYPO3 8.7中的响应图像渲染裁剪选项

时间:2017-10-16 19:45:57

标签: typo3 typo3-8.x typo3-8.7.x

我覆盖了像Image Manipulation的cropVariants,如下所示:

https://docs.typo3.org/typo3cms/extensions/core/8.7/Changelog/8.7/Feature-79812-AllowOverridingCropVariantsForImageManipulation.html

但是如何根据流体中的特定cropVariant渲染FIRST图像?对于@media(最大宽度:575px){},请说“移动”......?

模板中的调试显示第一个'创建新关系'媒体文件(jpg图像)以下用于裁剪:

<f:debug>{data}</f:debug>

array(85 items)
...
   media => array(1 item)
      0 => TYPO3\CMS\Core\Resource\FileReferenceprototypeobject
         propertiesOfFileReference => protectedarray(35 items)
            ...
            crop => '{"desktop":{"cropArea":{"x":0.011,"y":0,"width":0.924,"height":0.99047619047
               619},"selectedRatio":"NaN","focusArea":null},"mobile":{"cropArea":{"x":0.094,"y":1.917337540
               94e-15,"width":0.786,"height":0.99809523809524},"selectedRatio":"3:2","focus
               Area":null}}' (392 chars)
...

1 个答案:

答案 0 :(得分:1)

{{1}}
相关问题