ContentBlocks Image Field URLs with S3/CloudFront Media Source - Inconsistent Behavior

Hi, I am using MODX 3.1 + Content Blocks 1.14.0-rc2 and and AWS S3 as Media Source with CloudFront (https://media.url…)

There is inconsistent behavior when handling images in the ContentBlocks Image Field, depending on how the image is added

When an image is uploaded directly in the Image Field: Backend and Frontend displays the image correctly. img src is https://media.url…/image.jpg

When an image is selected from the Media Manager: Backend and Frontend do not display the image. The URL Format then is without the domain, just “/image.jpg”

contentblocks.image.source is set to AWS Media Source
contentblocks.base_url_mode i tryed with “full and default” but the behavior doesnt change.

Anyone using AWS with Content Blocks? Any input appreciated!

Found the problem: AWS MediaSource settings use “url” instead of “baseUrl”. Adding “baseUrl” with the same value as “url” fixed it.

1 Like