added different image formats support