[ad_1]
Hi everybody, I need to resize over 300 images for my site and make them smaller than 100kb. I finished resize them one by one and I plan to dump them inside the upload folder and replace the old ones.
The images all have the same file names and of course I will upload them in the right year/month folder. Will that cause any issues with the database? Or is there a better way to upload all those images?
Thanks
[ad_2]
You should just use a plugin like Smush or some other image optimization plugin. When you upload images into your database, it automatically reduces the file size, and also lazy loads them.
For like simple resizing stuff I just use Canva.
Yes you can dump the newly resized images on top of the ones that exist in your WP folders – as long as the filenames are the same, the new files will be used. Note however that the thumbnails will still remain, which is usually fine, but you may want to use a “regenerate thumbnails” plugin if you think there’ll be a worthwhile filesize saving.
What u/bluesix says: It’s ok to download your media library and then optimize the images. I do this all the time as a site cleanup and optimizing specialist. You absolutely need to re-upload them to the same files and folders in the media library, otherwise WordPress won’t know where to find them when it looks up the locations in the database.
Also, as bluesix says, you may want to regenerate your thumbnails as well.
Since I manage a lot of websites for different people I’m able to periodically test the various image optimization plugins by uploading a reference image to each site’s media library, checking how well the plugin works, and then obviously deleting the test image again.
In my *recent* experience ShortPixel does by far the best job. If you’re patient the free version will eventually grind through all the images *and thumbnails.* Or you can buy a set of “credits,” optimize everything, and then let the free version handle the handful of new images that might be uploaded each month.
The arrival of WebP and (coming soon) AVIF image support has changed the optimization landscape. The better optimizing plugins can generate those as well as optimizing traditional .jpg and .png images. I’ve been consistently disappointed with both Ewww and Smush/SmushIt, but, again, I haven’t checked those lately to see how they handle WebP conversion.