Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Webp images path not shoing in graphql

Avatar

Level 2

I have used webp images in content fragments. When I create a graphql query to get images path. The json is coming blank for those images. where as JPEG images path are showing perfectly fine. Do I need to enable webp in AEM as cloud to get images path or it is not supported in graphql

Please advice

Harsharya_0-1747154547389.png

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Community Advisor

Hi @Harsharya,

I don't think, WebP images are not fully supported out-of-the-box in GraphQL queries due to missing renditions and missing metadata extraction support for that format. The JSON will return empty if:

  • AEM doesn't generate metadata for WebP,

  • The Asset lacks width/height or dynamic media info,

  • The GraphQL model can't resolve any of the required fields.

You can try this:

Enable WebP Processing in AEM

Ensure AEM is set to process WebP assets:

  1. Enable WebP in Asset Compute service (Cloud Service only):

    • By default, WebP is not processed the same way as JPEG/PNG.

    • You need to use custom Asset Compute workers or enable support via Adobe support.

  2. Verify WebP metadata in Asset UI:

    • Go to your WebP asset in DAM.

    • Check if metadata like width, height, and renditions are generated.

    • If not — that’s why GraphQL returns empty.

Use JPEG/PNG for GraphQL-Based Delivery

As a workaround, consider storing fallback versions in JPEG/PNG if GraphQL delivery is important. You can still serve WebP via Dynamic Media or client-side rendering techniques later.

Use renditions (if applicable)

In some cases, if you need to retrieve a rendition path of the WebP manually, and it’s generated by your own workflow, you could add that logic to your GraphQL model. However, this needs custom modeling, and is not automatic.

How to Check if WebP Is Supported

Run this AEM GraphQL query for a CF containing a WebP asset:

{
  yourContentFragmentModelList {
    items {
      images {
        ... on ImageRef {
          _path
          title
          width
          height
          _dynamicUrl
        }
      }
    }
  }
}

If all fields return null, AEM did not process the WebP file.

Hope that helps!


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 10

hi @Harsharya,

I think you can leverage the _assetTransform parameter: documentation

You can update the query like so:

_dynamicUrl
title
_assetTransform(format: WEBP, preferWebp: true)
      

In the response, the field _dynamicUrl should include the URL in WebP format.

Avatar

Level 2

@giuseppebag 

_assetTransform does not work with image ref. 

Harsharya_0-1747219907049.png

I have already tried this option in my query still its not showing image urls. In addition after applying asset transform on query it changes all the jpg url to webp which is not the requirement.

Harsharya_1-1747220186278.png

 

 

Avatar

Level 4

Hi @Harsharya,

Do you need more information or assistance regarding your query? If yes, please feel free to share a follow up query.

If you've discovered a solution yourself, we would appreciate it if you could share it with the community.

Avatar

Level 1

My Issue is still not resolving. The solution did not work. I am working on it.