WordPress get image attachment id from src

Dec
3
2013

This will take the url of any image size and return the id of the attachment