If you want to check if a remote image file exists on a WordPress site but don’t necessarily want to fetch or download that file, this lightweight helper function can be used for that purpose:

It can be used like this:

Leave a reply

Your email address will not be published. Required fields are marked *