Get the Attachment ID from an Image URL in WordPress

I recently needed a way to get the ID of a WordPress image attachment, but I only had the image URL to work with. The problem was complicated by the fact that the image URL could be a thumbnail of the original image attachment, i.e. one of the auto-generated post thumbnail image sizes.

Read more here: Get the Attachment ID from an Image URL in WordPress

Leave a Reply

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