find post id of attachement even if -scaled or -rotated is added to file name
-
I have some code that is using attachment_url_to_postid to find the post id from an image url that is uploaded via a form. The problem is when a large image is uploaded, or an image with orientation data is uploaded. WordPress then adds -scaled or -rotated to the file name so that attachment_url_to_postid no longer works. I’ve found a way to stop the images being scaled, but not a way to stop them being rotated. Is this possible? Or is it possible to find the post ID from the original image url?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘find post id of attachement even if -scaled or -rotated is added to file name’ is closed to new replies.