Enabling preview for web-optimized image | Community
Skip to main content
December 5, 2024

Enabling preview for web-optimized image

  • December 5, 2024
  • 4 replies
  • 3000 views

Hi,

I have a requirement to enable previewing of WebP images (*.webp) in AEM On-Premise, specifically in the author instance. Essentially, when an image is uploaded, you should be able to see its preview. Currently, we’re unable to preview WebP images even though the WebP MIME type has been added to the OSGi configuration.

I understand that AEM On-Prem does not natively support WebP images, but my requirement is specifically to preview the image in the author instance.

Please note that my use case applies only to AEM On-Premise and does not involve AEM as a Cloud Service or acquiring a Dynamic Media/Scene7 license for smart imaging capabilities.

The use case is strictly to preview the image once uploaded to the DAM. If this works, we can configure ImageMagick to generate the necessary renditions in WebP format. I have already reviewed the following suggestions.

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-assets/aem-6-5-assets-support-for-webp-images/m-p/558466

 

 

@lukasz-m @veenavikraman @vanegi @mahedi_sabuj @aanchal-sikka @estebanbustamante @h_kataria @sherinregi-1 @kiran_vedantam  @abhishek_dwevedi 

 

4 replies

December 5, 2024

@s1101v ,

i am able to see a preview of webp image when i upload it to my local dam.

 

which version of aem are you using?

s1101vAuthor
December 5, 2024

I'm using AEM 6.5.22.0

s1101vAuthor
December 5, 2024

Please confirm if you're using AEM Cloud or AEM On-Prem version.

GabrielMircea
December 5, 2024

Ensure that the MIME type is registered in:

  • Apache Sling Mime Type Service
  • Apache Jackrabbit Oak Blob Data Store

And create a custom handler or override the existing preview handler for WebP images by extending the DAM AssetProcessor service.

s1101vAuthor
December 5, 2024

Thanks for your reply. I have made changes only to the Mime Type configuration so far. Let me check the Oak Blob Data Store, as you suggested.

 

Could you please explain more about the need to introduce a custom handler or override the existing DAM AssetProcessor service?

GabrielMircea
December 10, 2024

I have already updated Apache Sling MIME Type Service” before I raise this ticket.

 

The issue is with adding the MIME type in Apache Jackrabbit Oak Blob Data Store. 
Do we update anything service. You have listed this one in your initial response.

 

 


Ah, my bad. So, in regards to the Apache Jackrabbit Oak Blob Data Store. Do you use FileDataStore configuration? If the jcr:mimeType is not correctly set, the issue may be from Oak not recognizing WebP as a valid type.

 

 

Navigate to MIME Types:

Path: /jcr:system/jcr:mimeTypes.

 

Add the WebP MIME Type:

Create a new node under /jcr:system/jcr:mimeTypes:

Name: image/webp

Properties:

jcr:mimeType: image/webp

jcr:primaryType: nt:unstructured

 

 

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 7, 2024

A scenario for this could be that a dispatcher filtering out and limiting rendering of that specific file.

Check your dispatcher, does it allow webp files?

/filters { /0001 { /type "allow" /url ".*\\.webp" } /0002 { /type "deny" /url "/etc/.*" } ... }
s1101vAuthor
December 7, 2024

Thank you for your response. The issue is specific to the author instance, not the publish instance. I want to enable the preview of WebP images on an AEM 6.5 on-premise instance.

kautuk_sahni
Community Manager
Community Manager
January 7, 2025

@s1101v  Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
January 7, 2025

I tried the suggested solution but it is not working.