Given I have an image URL
And that the image has previously been saved in the media library
How can I find the media's ID?
i.e.
.jpg might be ID 4
.jpg-scaled-300x300.jpeg is also ID 4
Given I have the URL, how do I find the ID?
function returnMediaID($URL){
... // What goes here?
}
$URL = ".jpg";
assertEquals( returnMediaID($URL), 4);