move extension check after the imgur check