AEM 6.4 asset renditions, is it safe to remove all the rendition - aem

I have created a custom workflow model for DAM update asset. I have kept two steps only Metadata Processor and DAM Update Asset Workflow Completed
I am on 6.4 and I could see 319x319 rendition is used in content finder. Want to know if other renditions are used by any default AEM components? If used, is there any possibility to make all of them point to a single rendition?

You can safely remove all renditions, if, in fact, you do not use them at all and you display the raw image from your DAM (the only downside is that your Content Authors will lose several thumbnails, usually helpful to identify the asset they want to use). If you need image manipulation and optimization, you can review ACS Commons Named Transform Image Servlet or any other external service (Akamai, Adobe Dynamic Media).

Related

get asset properties on htl page with asset path without using backend service in crx

I have an asset path, which contains an asset, which I want to display in the UI. I can display the image using the path. But I want to display asset properties like title and other metadata which are present in jcr:content under that asset path.
One way I'm aware of is to use backend service and adapt to the asset and fetch those properties and send it to html file. Is there any way I can directly fetch those details in html file itself without having to use backend service.
note: asset number can be very high, would it better to use the service itself.
It's best to use the (backend service) Asset APIs but you could also hack your way with just HTL if you know exactly the JCR node and property. data-sly-use allows specifying a JCR path to return the org.apache.sling.api.resource.Resource:
<sly data-sly-use.myImg="/content/dam/core-components-examples/library/adobe-logo.svg/jcr:content/metadata">${myImg.valueMap['dc:title']}</sly>
Example for asset title.
${item.metadata['dc:title']}

Optimise images in AEM

We are using AEM 6.2 and want to optimise multiple images in AEM to get a low resolution image. Please suggest how can we get low resolution images upon uploading the images or some other way.
If you are using ACS commons, explore named-image-transform else you have to generate custom renditions using Workflows.
If you already have an Dynamic media add on , try to leverage smart imaging
You can leverage ImageMagick and modify the DAM Asset Workflow to create low-resolution images renditions.
http://www.imagemagick.org/Usage/resize/
https://helpx.adobe.com/experience-manager/6-2/assets/using/best-practices-for-imagemagick.html
Thanks!

Can AEM 6.2 be enhanced to support webp?

We need to support webp images in AEM 6.2.
As this is not supported by default, is there a possibility to enhance AEM by adding and rendering a new mime type?
You could implement a workflow process step to do this along with a Java WebP library such as webp-imageio [0], then add this step to your default asset workflow (usually update_asset) so they are created along with the standard web/thumb renditions.
Alternatively you can convert them offline ad-hoc and upload as a custom rendition if you only need them for a few assets.
[0] https://bitbucket.org/luciad/webp-imageio

Restrict the Type of files to be upload in DAM under a specific Path in AEM 6.3

I want to restrict the types of files to be uploaded under a path. For Ex, /content/dam/test should only upload Pdf's file under it.
I try to add a property mimeTypes under this node :
/libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/fileupload
but it puts the restrictions over the complete dam folder.
Any Help will be appreciated.
2 options that I can think of:
Do it in JS. Add a listener and write custom logic there.
Add a custom step in upload asset workflow and perform all your logic
there.

Add custom metadata fields for DAM assets in a particular folder

I created custom metadata fields for DAM Assets in CQ 5.6.1 using the steps detailed here. However, as described in the document, these changed fields are available for ALL assets in the DAM.
I need these metadata fields to be made available to only a specific folder, say /content/dam/foo instead of every asset.
How can I achieve this?
In my knowledge, there is no straight forward way to achieve this but there is one trick to handle this.
AEM DAM has the notion of meta schema editors. These editors are tied to asset file type, meaning - jpeg, mov, etc. For an asset MIME type, you can define the meta data and its associated form.
AEM 6.0 provides choral UI interface to achieve this --
http://localhost:4502/libs/dam/gui/content/metadataschemaeditor/schemalist.html/dam/content/schemaeditors/forms
Am not aware of any such interface in AEM 5.6.1. The nodes tied to this are at /libs/dam/content/asseteditors/image/jpeg/formitems. You could overlay them at /apps to add the required metadata.
Coming to the question, the trick is to add the file type into your dam content hierarchy. Example - /content/dam/jpeg/foo, /content/dam/png/foo, etc. This way, you would get different metadata for different folders of the dam.
Adobe recommends this approach as AEM 6.0 introduced the concept of processing profiles which you could attach to folders. This way, your different file types could get different treatments.