keystatic icon indicating copy to clipboard operation
keystatic copied to clipboard

Build breaks when there is a space in the image file path.

Open thejackshelton opened this issue 1 year ago • 0 comments

I have ran into this issue multiple times, and so I thought putting it here rather than discord might be a better place. Sorry for that haha.

When using the default image feature, if a space is added in the image file name, it will break the build. This is all the more common when you have the copy of an image. img (1).

I tried updating to the latest version and still ran into this issue when there was a space in the image file name path. Perhaps we could somehow do a replace with an underscore of some sort?

For example:

BREAKS BUILD :x: my special image.webp

DOESNT BREAK BUILD :white_check_mark: my-special-image.webp OR mySpecialImage.webp

is there a way to trim spaces in filenames so that can't happen again? Or a preferred approach?

To reproduce: Add an image with a space in its name to the document rich text editor, and try building

thejackshelton avatar May 03 '24 00:05 thejackshelton