It would be handy to include more formats like psd. It seems it is not too difficult to convert it to jpg during import: command line - How to convert PSD to JPG or PNG on Linux with Gimp CLI/batch mode (or other server-side tool)? - Super User
ImageMagick has a pretty horrible security track record, but if someone doesn’t mind the security implications, installs it externally, I guess I could fork out a call to
convert and if it returns something, I import it?
The referenced npm module is abandoned, but it’s just a wrapper around GitHub - meltingice/psd.js: A Photoshop PSD file parser for NodeJS and browsers
I haven’t tried it, but the library on your link says it has no native module dependencies. So your ImageMagick security concern could be avoided
ghostscript generates rastered images of .ai and .pdf:
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=jpeg -SOutputFile=output.jpeg input.pdf