Hello, thanks for making this video to help users decide to save website images in a different folder. However, important points needs noted: 1. When we would want to do this? Only reason to move the media files to a different folder can improve your website’s speed and performance. But speed is only improved when the images are not residing on the same site folder but on a different subdomain or external folder from where the images will be retrive faster. Moving images from upload folder to a new image folder under same web directory don't make sense. 2. By default wordpress creates sub-folders under the upload folder for the different years / months. There is a good reason to do this because it makes it easy to delete old files not in use. You should have mentioned that. 3. For backup having a different media upload location is helpful. 4. updating your function.php done incorrectly can break your website. Also not to forget if you change the theme then you will loose all your custom code will get deleted. So using code snippet makes more sense then doing it directly on function.php. 5. Wordpress settings - Image sizes. Wordpress automatically crops the image sizes on upload based on what is set (Thumbnail size, Medium, Large). Themes also have this option. However, it's best to keep all image sizes to zero so that wordpress does not resize the images on upload. Why? Because wordpress will create multiple images from a single image uploads. So it's best practice to resize the images on your own before uploading on wordpress, hope you agree.
@@BlessedChannelTutorials suppose i have a image uploaded in this directory /public_html/wp-content/uploads/2022/04 now I want to replace that image manually so that url stays the same. when I'm deleting old file example: xyz.jpg and uploading a new file xyz.webp (extension is different) in that time in media library, xyz.webp file is not showing..
If anyone had the same problem as me: I found out that you need to add the code right before the line /* That's all, stop editing! Happy blogging. */ ... i couldn't get it to work otherwise.