What are the restrictions on image filenames?

It appears that Ghost (4.6) doesn’t support image filenames containing “#”. is this expected? What other characters should I be watching out for?

I imported a ZIP containing images with “#” characters in the filenames, and that completed and reported success. But then when I tried to open the post referencing those images, all of the images were broken. Investigating with curl, both the %-encoded version and the literal version show a 404. By contrast, with my original image host, the literal version is a 404, but the %-encoded version hits the actual file. The original version of the post looks fine, so presumably a web browser will also %-encode the character when fetching the image.

$unzip -l embedded-ghost-import.zip | grep 710_1761
   286834  2021-05-30 06:13   content/migrated_images/2018/08/power-versus-efficiency/0#710_1761.jpg

$curl -s -I 'https://doppler-photo.ghost.io/content/images/migrated_images/2018/08/power-versus-efficiency/0%23710_1761.jpg' | grep '^status'
status: 404 Not Found

$curl -s -I 'https://doppler-photo.ghost.io/content/images/migrated_images/2018/08/power-versus-efficiency/0#710_1761.jpg' | grep '^status'
status: 404 Not Found

$curl -s -I 'http://web.mit.edu/~xsdg/www/pblog/2018-jul/4-horiz/0%23710_1761.jpg' | head -1
HTTP/1.1 200 OK

$curl -s -I 'http://web.mit.edu/~xsdg/www/pblog/2018-jul/4-horiz/0#710_1761.jpg' | head -1
HTTP/1.1 404 Not Found

By contrast, filenames that don’t contain a “#” character are served with no issues

$unzip -l embedded-ghost-import.zip | grep xt2_2228
   158663  2021-05-29 20:33   content/migrated_images/2020/10/orange-haze/xt2_2228.jpg

$curl -s -I 'https://doppler-photo.ghost.io/content/images/migrated_images/2020/10/orange-haze/xt2_2228.jpg' | grep '^status'
status: 200 OK

When I upload the same image via the Ghost post editor, I note that the “#” character is replaced with a “-”: