Img prop constraints require extension to be lower case

Created on 10 April 2025, 3 months ago

Overview

Media library does not mind if image file extensions are caps or not-caps, but the validation constraints for image props currently require them to be all lowercase. This can result in an image that Media Library is fine with (f.e. filename.JPG to be added as the value for a component image prop, which will then result in an error when the invalidly-named image is sent to be part of the updated preview.

Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("[experience_builder:image/image.src] Does not match the regex  
                                         pattern ^(/|https?://)?.*\.(png|gif|jpg|jpeg|webp)(\?.*)?(#.*)?$."). in Twig\Template->yield() (line 1 of                                                 
                                         modules/custom/experience_builder/components/image/image.twig).  

Proposed resolution

User interface changes

๐Ÿ› Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024