renaming an image automatically everywhere else (posts and pages)
I did the same thing few days back. I took the post slug as image name for SEO purpose. I created a function to create/move images to a particular folder depending on the slug and input image url. Here is look of my function- function tb_get_image($image_ext_url,$slug,$upload_folder=””,$title=””){ $uri = WP_CONTENT_DIR.”/uploads/”.$upload_folder; $folder = WP_CONTENT_URL.”/uploads/”.$upload_folder; if(!file_exists($uri)){ $oldmask = … Read more