check image header to identify image type,

if only bytes are given.
allow Image("filename")