Issues backfilling URLs for images that have been edited
-
I’m trying to use this plugin to move content between sites. We are having an issue with an import where many of the image tags are not being backfilled to use the image file from the new site, and I think the issue is with images that have been edited/scaled on the source site. I’ve dumped the $url_remap array to take a look at the search/replaces that are being attempted, and it doesn’t look like they properly account for edited images. (Full disclosure: I’m not very savvy at how the WP Image Editor works.)
Example Image Tags that DID work (just as a control test)
https://old-network.edu/subsite/files/2022/10/Trail-building-River-Valley-Conservation-10.11.22.jpg
became
https://new-network.edu/subsite/wp-content/uploads/sites/496/2022/10/Trail-building-River-Valley-Conservation-10.11.22.jpg
Perfect!
Now let’s take a look at a few that did NOT backfill properly, and the url mappings associated with them.
https://old-network.edu/subsite/files/2023/07/IMG_0437-400×600.jpg
was unchanged ?? There were 3 related Mappings:
https://old-network.edu/subsite/files/2023/07/IMG_0437-e1690822076996.jpg” => https://new-network.edu/subsite/wp-content/uploads/sites/495/2023/07/IMG_0437-e1690822076996.jpg
https://old-network.edu/subsite/files/2023/07/IMG_0437-e1690822076996 => https://new-network.edu/subsite/wp-content/uploads/sites/495/2023/07/IMG_0437-e1690822076996
https://old-network.edu/subsite/files/2023/07/IMG_0437.jpg => https://new-network.edu/subsite/wp-content/uploads/sites/495/2023/07/IMG_0437-e1690822076996.jpg
As you can see, none of these mappings actually capture this image for replacement. My assumption/theory is that it’s due to it being edited on site.
Here’s another one that did not backfill properly, but with a different URL oddity noticed in the url mappings.
https://old-network.edu/subsite/files/2024/01/2023-Annual-Summary_Page_1-195×252.jpg
was unchanged ?? Once again, there were 3 related Mappings
https://old-network.edu/subsite/files/2024/01/2023-Annual-Summary_Page_1-scaled.jpg => https://new-network.edu/subsite/wp-content/uploads/sites/495/2024/01/2023-Annual-Summary_Page_1-scaled-1.jpg
https://old-network.edu/subsite/files/2024/01/2023-Annual-Summary_Page_1-scaled => https://new-network.edu/subsite/wp-content/uploads/sites/495/2024/01/2023-Annual-Summary_Page_1-scaled-1
https://old-network.edu/subsite/files/2024/01/2023-Annual-Summary_Page_1.jpg => https://new-network.edu/subsite/wp-content/uploads/sites/495/2024/01/2023-Annual-Summary_Page_1-scaled-1.jpg
Again, none of these mappings actually capture it, with again my assumption being due it being scaled on site.
- You must be logged in to reply to this topic.