Support gif and jpg image extensions.