I am working with wordpress images that the user chooses. They may or may not have been resized by wordpress and have their size added on to the end of the image like so:
original image: image.jpg wordpress version: image-300x200.jpg
How would I search to see if the image has this added to it? The easiest way would be to check if it has an 'x' 8 characters from the end of the variable but then there is the off chance that the image could actually have an x in it there.