sdsykes / fastimage

FastImage finds the size or type of an image given its uri by fetching as little as needed
http://github.com/sdsykes/fastimage/tree/master
MIT License
1.37k stars 115 forks source link

Identify SVG files that start with a BOM character #126

Closed jbrw closed 3 years ago

jbrw commented 3 years ago

We have encountered SVG files that begin with a BOM character.

https://en.wikipedia.org/wiki/Byte_order_mark

If the first two chars are the start of a BOM character, it will fetch additional characters as it attempts to find the opening <svg tag (the same as if two spaces are the first chars in the file, etc).

sdsykes commented 3 years ago

Makes sense, I'll look at this asap.

SamSaffron commented 3 years ago

@sdsykes any news here? Is there anything you would like us to improve with this PR prior to merging?

sdsykes commented 3 years ago

Looks good to me, just need to fix the conflict since I merged heif support

jbrw commented 3 years ago

@sdsykes I believe the merge conflict has been resolved.