如何在AEM中访问图像渲染 [英] How to Access Image Rendition in AEM

查看:124
本文介绍了如何在AEM中访问图像渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的项目中,我们使用Dam Workflow在大坝中创建的图像具有不同的表示形式。
现在,当我们要访问页面中的图像时,我们将如何知道根据设备动态访问哪个格式的图像。
是UI决定还是AEM决定。

we have different renditions of image created in dam by Dam Workflow in our project. Now when we want to access an image in page how will we know which rendition to access dynamically depending on the device. Is it something which UI decides or is it something AEM decides. And how does it work with dispatcher.

我们非常感谢您的帮助。
谢谢,
Tushar

Any help is highly appreciated. Thanks, Tushar

推荐答案

您可以在组件中构建逻辑,以便它们能够获取正确的图片,因此UI决定要提取哪个图片格式。您可以使用图片元素之类的东西或图片填充polyfill 来执行此操作。这些元素允许您定义屏幕分辨率的最小值和最大值以及

You can build logic into your components so that they will fetch the correct image, so the UI decides which image rendition to fetch. You can use something like the picture element or something like the picturefill polyfill to do this. These elements allow you to define the screen resolution min and max and


,浏览器将仅下载为$ b $明确说明的图像b匹配方案。

"the browser will only download the image explicitly stated for the matching scenario."

您可以构建不同的 srcset属性来引用您的不同再现URL。由于每个格式副本都有不同的url,因此每个副本格式将分别缓存调度程序。

You can build the different "srcset" attributes to reference your different rendition URLs. Since each rendition has a different url, each will get dispatcher cached separately.

也请查看图像预设

这篇关于如何在AEM中访问图像渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆