Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 867989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:04:03+00:00 2026-05-15T10:04:03+00:00

I am having a bit of trouble getting Gravatars to work properly: When I

  • 0

I am having a bit of trouble getting Gravatars to work properly:

When I request the following:

http://gravatar.com/avatar/8a17d0d0d8bdf6a8d527bbc943a17cf8.jpg?s=64&d=identicon

Firefox proudly displays the following:
http://files.quickmediasolutions.com/gravatar_p.png

…indicating that the file is a PNG image.

This confuses me – I thought Gravatars were JPEG images. It seems like they can be either. How can I find out if a given image is PNG or JPEG preferably without downloading it first?


Note: Some people are reporting that Gravatar only returns PNG images. Please explain this:

http://files.quickmediasolutions.com/gravatar_p2.png

http://gravatar.com/avatar/03cd042b82ac85b2c5fe0757a94e0413?s=64&d=identicon
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:04:06+00:00Added an answer on May 15, 2026 at 10:04 am

    If Gravatar icons have accurate MIME types assigned by the server you’re accessing them from, just check that. It should be image/jpeg for JPEGs and image/png for PNGs.

    Failing that…

    http://en.wikipedia.org/wiki/Portable_Network_Graphics#File_header

    A PNG file starts with an 8-byte signature. The hexadecimal byte values are 89 50 4E 47 0D 0A 1A 0A; the decimal values are 137 80 78 71 13 10 26 10.

    So just check the eight bytes at the beginning of the file; if it’s a PNG, it’ll have the stated values in those bytes, and if not, it won’t. Just download the file, possibly store it somewhere temporarily (which shouldn’t be too hard considering it shouldn’t be too big), and process it differently depending on what the header contains. You can always change the file extension and then use PHP’s graphics library if you saved it as the wrong type at first. (Or are you not allowed to do that?)

    As a side note, my favorite bit about the PNG header:

    50 4E 47 In ASCII, the letters PNG, allowing a person to identify the format easily if it is viewed in a text editor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having a bit of trouble getting my URLs to work properly. The URL looks
I'm having a bit of trouble getting the following to work: I'm creating an
I am having a bit of trouble getting my groovy code to work properly
I'm having a bit of trouble getting my form validation to work. As of
I am having a bit of trouble getting my head around the following erlang
I'm having a tad bit of trouble getting the jQuery Form Plugin to work
Hey guys I'm having a bit of trouble getting my htaccess to redirect properly
I'm having a bit of trouble getting some nested, containerless foreach bindings to work.
I am having a bit of trouble getting these polymorphic associations to work completely.
I am having a bit of trouble getting this c# code to work I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.