diff --git a/changes.xml b/changes.xml index d3bf1781..daea93de 100644 --- a/changes.xml +++ b/changes.xml @@ -36,6 +36,9 @@ Dynamic Media with OpenAPI: Prefer named smart crops over auto-cropped smart renditions. + + Dynamic Media with OpenAPI: Enable metadata service by default. + Improve trace logging: Make log messages involving value maps and resource/page objects more compact and better readable. diff --git a/src/main/java/io/wcm/handler/mediasource/ngdm/impl/metadata/NextGenDynamicMediaMetadataServiceImpl.java b/src/main/java/io/wcm/handler/mediasource/ngdm/impl/metadata/NextGenDynamicMediaMetadataServiceImpl.java index 53266f29..c883d162 100644 --- a/src/main/java/io/wcm/handler/mediasource/ngdm/impl/metadata/NextGenDynamicMediaMetadataServiceImpl.java +++ b/src/main/java/io/wcm/handler/mediasource/ngdm/impl/metadata/NextGenDynamicMediaMetadataServiceImpl.java @@ -66,7 +66,7 @@ public class NextGenDynamicMediaMetadataServiceImpl implements NextGenDynamicMed name = "Enabled", description = "When enabled, metadata is fetched for each resolved remote asset. This checks for validity/existence of " + "the asset and for the maximum supported resolution of the original image, and allows to fetch Smart Cropping information.") - boolean enabled() default false; + boolean enabled() default true; @AttributeDefinition( name = "HTTP Headers", diff --git a/src/site/markdown/dynamic-media-openapi.md b/src/site/markdown/dynamic-media-openapi.md index 1de5c903..ce423c82 100644 --- a/src/site/markdown/dynamic-media-openapi.md +++ b/src/site/markdown/dynamic-media-openapi.md @@ -51,14 +51,12 @@ During the media resolution process, when the media handler has detected the req When rendering local assets, the existence and approval state is checked within the local content repository when resolving the media. For this reason, local assets have to be published in AEM after setting the Approval state. -For remote assets, the Media Handler assumes by default that a given remote asset reference is always valid, and supports all requested resolutions. - -Optionally, you can enable the metadata service. If enabled, each time a remote asset reference is resolved, the following checks are executed: +For remote assets, validating depends on the state of the metadata service (see system configuration). If enabled, the following checks are executed during media resolution: * If the remote asset does not exist, or is not approved, the reference is handled as invalid and the component can react to it (e.g. hide the image component). * If the requested resolution of a rendition is larger than the original resolution of the binary asset, the rendition is handled as invalid. This avoid upscaling, and avoids using an asset in a context which would result in bad image quality for the user. -See system configuration how to enable the metadata service. +If the metadata services is not enabled, the Media Handler assumes by default that a given remote asset reference is always valid, and supports all requested resolutions. ### System configuration @@ -97,7 +95,7 @@ The "wcm.io Dynamic Media with OpenAPI Support" OSGi configuration allows to rec With this, you can configure an environment variable `LOCAL_ASSET_DELIVERY_REPOSITORY_ID` pointing to the actual host name which usually has a syntax like `delivery-pXXXXX-eXXXXX.adobeaemcloud.com` with the corresponding program and environment numbers. -The "wcm.io Dynamic Media with OpenAPI Metadata Service" allows to enable the Asset Metadata support (see above). When this is enabled, for each resolved remote asset, a HTTP request is send from the server to the DM API, so make sure this is allowed in the network infrastructure (should work by default in AEMaaCS instances). Optionally, you can configure an proxy server and timeouts. +The "wcm.io Dynamic Media with OpenAPI Metadata Service" allows to enable the Asset Metadata support for validation and Smart Cropping. The metadata service is enabled by default. If enabled, for each resolved remote asset a HTTP request is send from the server to the DM API to fetch the asset's metadata. ### Known Limitations (as of June 2024)