I made a python script that lets you embed PNG images of any size into an SVG file, which you can then upload as a Scratch costume. You can download it at https://gitlab.com/-/snippets/2110185 Images will be scaled to fit Scratch's stage size but won't affect their aspect ratio. This tool sets certain metadata values that should cause your images to render at their best resolution on all major browsers. Drawback: The result will be about 33% larger in size than the source, due to base64 encoding. See https://developer.mozilla.org/en-US/docs/Glossary/Base64#encoded_size_increase
Press space to toggle zoom. Image used: https://commons.wikimedia.org/wiki/File:Aran_Kel,_Neelum_Valley_AJK_(Pakistan).jpg, scaled to about 2000 pixels wide.