fix #23291

Adding .jpeg and .gif to the list of allowed extentsions and formats.