1

我知道在将任何图像/资产上传到 AEM DAM 时会创建演绎版,但我想知道这些演绎版将如何使用?

通常在进行内容创作时,我们将仅指向 DAM 资产路径,但从未使用图像的特定再现路径。谁能帮我举个例子来使用这个演绎版。?

大坝演绎

4

2 回答 2

3

最常见的用例是通过使用图片元素来获得“响应式”图像(与 IE 一起使用时需要像picturefill.js这样的 polyfills )。

这是从自适应图像的 Adob​​e 文档中获取的示例:

<div data-picture>
    <div data-src='/content/dam/geometrixx-media/articles/meridien.png'></div>                                        
    <div data-src='/content/dam/geometrixx-media/articles/meridien.png/jcr:content/renditions/cq5dam.thumbnail.319.319.png'    data-media="(min-width: 769px)"></div>  
    <div data-src='/content/dam/geometrixx-media/articles/meridien.png/jcr:content/renditions/cq5dam.thumbnail.140.100.png'   data-media="(min-width: 481px)"></div>     
</div>

因此,将为定义的视口断点呈现适当的图像data-media

于 2017-02-16T07:37:55.910 回答
0

您还可以考虑使用 acs-aem-commons 包附带的 Named Transform Image Servlet。仅使用图像 URL 可以很方便地动态控制图像的许多方面。

https://adobe-consulting-services.github.io/acs-aem-commons/features/named-image-transform/index.html

于 2020-01-10T19:27:02.517 回答