Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
How to determine with javascript whether a url that ends with no extensions is a plain image and not a gif?

I am trying to validate URLs and return false if such URLs happen to return gifs, like these:

  • https://lh3.googleusercontent.com/nxOF05Y28F2WSBPupmOBgTuSxG-GY1BbhZJyOrjVrjKdAax0VTb4_q4_yDnNsFMTdXPZYpmr19nttJ8c1Pzzd835vOEODQGUvcPG
  • https://lh3.googleusercontent.com/s4a9blztSlDXhjApbdob6CfQ6OUeIiRxb00w9-4Z2Q-6PIp9FGePtI8NBfUfgSgAki3EI2too6zdRyV9qwxdnUWaYLWGgkBa0MN_
  • https://lh3.googleusercontent.com/TJIJhjYUMN2iHsS7Su_WnnfqfbQmJI8y8-zU32-GzYfbDDwofXLMRKk_Q2FTzT096dzDIyptA7-khH2tbCWwbvuWf6V4ITCf3ZncuA
  • https://lh3.googleusercontent.com/4rIhhfLWqB3qUi-BMkXlyMnylwztk-HfOUQhtsmPBtfJKLh2FPNPMgL3YL6Jg0JMopsMcjaevYjXYw8lR9vFRfrZ2rsV7JXPo6mRVws

However, I cannot use regex as no URL returns something that ends with ".gif".

I have no idea how to verify the format of a file that is returned from a URL, if the said file does not have an extension at the end... may anyone point me in the right direction?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda