support of png images used in img tags
png support in from_html plugin
How about if we modify addImage() to detect the format from the raw data? (it does already for data-uris)
I think it'd be matter of checking if the first four bytes matches with 0x89504e47
addImage: Detect PNG format from raw data - related to #291
Check 0f3c2d0 - it's untested but i think it should work :)
hey, that's possible, but I just tried 0f3c2d0 which is not working as createDataURIFromElement (line 498) needs the format to convert the image to a data uri (i think)
Oops, wrongly recall fromHTML's images contains raw data while they are indeed IMG nodes :$
Well, i'm still thinking that should be added to the addImage plugin, so feel free to modify createDataURIFromElement by reusing the 'element.nodeName === 'IMG' block.
Btw, relying on the file extension isn't accurate as you can guess, but if we have to check that i'd rather use /\.png(?:[?#].*)?$/i.test(src)
addImage: detect png format from img.src - related to #291
8247a27 should do it.
yup, works great, just tested. thanks