Hi. @evelynlambert07
That’s a good question. I do have a follow-up query though. You mentioned the following URL structure: example.com/7850
. Are you referring to images that you have uploaded in the media library? If so, they have direct links in the format of: example.com/wp-content/uploads/2021/08/image.jpg
or if we are talking about the attachment pages, something like: https://example.com/?attachment_id=15
.
Are you talking about modifying the permalinks of these images? Or are you talking about renaming certain permalinks of your site to a different structure?
The additional information would really provide me with more context on how we can help you better!
Thanks!
Thankyou for your reply @harishanker ! Yes I want to modify the the permalinks. I made a mistake while uploading the pictures and forgot to rename them actually. So they are not SEO optimized.
Let me make a more clear example. For suppose the image name when I uploaded was “Untitled”. Now by default the image link is
example.com/wp-content/uploads/2021/08/untitled.jpg
I want optimized links with keywords so I want to change the permalink to
example.com/wp-content/uploads/2021/08/pink-cups.jpg
I hope this would make things more clear. Thankyou for helping out! 🙂
@evelynlambert07 Apologies for the late reply, I missed your message.
I did some digging on this for you – there does not seem to be a way to natively change the file name for an uploaded image. You can definitely add captions and alt tags for uploaded images though. The straightforward way to fix this would be to delete the uploaded image and to add a new image (with the right name). However, if there are many images, that could be cumbersome.
I found this article that suggests a workaround: https://www.wpbeginner.com/plugins/how-to-rename-images-and-media-files-in-wordpress/ The article recommends using the following plugin: https://wordpress.org/plugins/phoenix-media-rename/ – which allows you to rename filenames. It offers step-by-step instructions on how to do it. Do give it a try.
I hope that helps.
Thankyou @harishanker !!!! I tried it out and it worked!!!I’m so thankful to you. And yes re-uploading all images will take too much time and I don’t even have those images anymore. The plugin worked thanks a lot!
So glad to hear that this helped, @evelynlambert07! All the best! 🙂