Process jpeg and png images