core icon indicating copy to clipboard operation
core copied to clipboard

Image field slug uses backslash on Windows localhost | no thumbnail preview in back office

Open Tom-Pich opened this issue 2 years ago • 1 comments

Hello to all,

When filling an image field, selecting an image from the library results in slug being displayed with backslash (e.g. images\img02.jpg). This doesn't cause any problem on the front side, but the image thumbnail shows "404 image not found".

Reproduction

On a content type that has an image field :

  • choose Upload from library
  • select an existing image in the library

Result

The preview thumbnail of the image has the following HTML: <a href="/thumbs/1000×1000/images\img02.jpg" class="editor__image--preview-image" style="background-image: url("/thumbs/400×300/imagesimg02.jpg");"><span class="sr-only">Preview the image</span></a> The url background image is clearly not well-formed (the \ has been ripped instead of being replaced by /). The link href works perfectly.

Details

Question Answer
Relevant Bolt Version 5.1.24
Install type Composer
BC No
PHP version 8.2
Web server Built-in, Symfony 5.4.25
For UX/UI issues Firefox 114.0.2

Tom-Pich avatar Jul 03 '23 07:07 Tom-Pich

In an effort to keep our issue list manageable, we are marking this issue as stale because it has been 60 days without activity. If this issue is still relevant, please let us know by posting a quick comment so that it remains open.

github-actions[bot] avatar Dec 09 '25 07:12 github-actions[bot]