Skip to content

Commit

Permalink
Merge commit '90b8c270bdf717b695e482543af746434ac7f90e' into ue
Browse files Browse the repository at this point in the history
  • Loading branch information
Satya Deep Maheshwari committed Nov 12, 2024
2 parents 5456bec + 90b8c27 commit 942e64c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 3 additions & 2 deletions plugins/aem-assets-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ The AEM Assets Plugin helps you quickly integrate with AEM Assets for your AEM p
- You need to have access to [Dynamic Media Open API](https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/dynamicmedia/dynamic-media-open-apis/dynamic-media-open-apis-overview)

And you need to have pre-configured:
- [AEM Assets Sidekick plugin](https://www.aem.live/docs/aem-assets-sidekick-plugin)
- [AEM Assets Sidekick plugin](https://www.aem.live/docs/aem-assets-sidekick-plugin) if using Doc based authoring OR
- [Universal Editor Custom Asset Picker](https://developer.adobe.com/uix/docs/extension-manager/extension-developed-by-adobe/configurable-asset-picker/) if using Universal Editor based authoring

## Installation

Expand Down Expand Up @@ -45,7 +46,7 @@ Here's typically how `scripts/aem-assets-plugin-support.js` would look:

```
// The based path of the aem-assets-plugin code.
const codeBasePath = '/plugins/aem-assets-plugin';
const codeBasePath = `${window.hlx?.codeBasePath}/plugins/aem-assets-plugin`;
// The blocks that are to be used from the aem-assets-plugin.
const blocks = ['video'];
Expand Down
10 changes: 2 additions & 8 deletions plugins/aem-assets-plugin/scripts/aem-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ function isExternalImage(element, externalImageMarker) {
return true;
}

// if the element is an anchor with the href as text content and the href has
// an image extension, it's an external image
if (element.textContent.trim() === element.getAttribute('href')) {
const ext = getUrlExtension(element.getAttribute('href'));
return ext && ['jpg', 'jpeg', 'png', 'gif', 'webp'].includes(ext.toLowerCase());
}

return false;
const ext = getUrlExtension(element.getAttribute('href'));
return ext && ['jpg', 'jpeg', 'png', 'gif', 'webp'].includes(ext.toLowerCase());
}

/*
Expand Down

0 comments on commit 942e64c

Please sign in to comment.