Home Wordpress Wordpress Tips & News WordPress Duplicating Images Uploaded to Media Folder

WordPress Duplicating Images Uploaded to Media Folder

12
0
WordPress duplicating images uploaded to media folder
WordPress duplicating images uploaded to media folder

Are you having an issue with WordPress duplicating images uploaded to the media folder?

When it comes to optimizing WordPress don’t forget that each theme will generate different amounts of images that are required for the theme to work correctly. Of course, magazine-style themes tend to have much more thumbnails of the 1 image uploaded due to the course of running all different styles of showcasing categories and header images.

For example, I run a magazine-style theme, and each image I uploaded with the media uploader within WordPress itself, generates more than 30 of the same image in different ratios.

When I checked each page for which sizes my theme was using I was left shocked to find out that I was actaully using 15 different aspect ratios on my WordPress website, here is the breakdown of the sizes I was using across different pages.

100×70.jpg (right side small thumbnail)
218×150.jpg – (category small)
324 x 235 – (category smaller thumbnail style for new categories, which has less content)
324 x 160 (small homepage image)
80 x 60 (homepage image)
534 x 462 (homepage top)
533 x 261 (homepage left top)
265 x 198 (homepage sides 2)
265×198 (homepage sides 3)
356 x 364 (cat image top)

Articles sections
1280 x 720 full image
696 x 364 jpg large
300 x 169 medium
150 x 150 thumbnail

The outcome

Now my conclusion was that I needed 1 image to generate 14 different versions of itself for different aspects for my website to function correctly, which left me speechless because I was certain that I only needed 4/5 max. Understanding that 30 variations are being made on each image that I upload using the back end media uploader in WordPress, left me thinking about the file size it will use up on my webserver, that’s 30 files per every single image I upload in my media folder in WordPress if your server has a limited space “file count” this can cause an issue, but then we needed all the featured imaged to have all the different ratios in case we switch up the theme style.

This is a screenshot of my FTP upload folder which was just 1 image uploaded using the media uploaded in the back end using the editor. In your media folder, you will only see 1 image of itself with an option for 3 different sizes when you click on it, small, medium and large, but when it comes to the back end, in the upload folder, there will be various images generated of the 1 image, which is quite well hidden, if you never checked the back end folder you would probably never find out.

This is why many people using WordPress, seem to upload 1 image and then they see their file count on their web hosting go from 1200 to 1230, and it leaves many people confused, not understanding that images which they uploaded using the media file uploader in the editor of WordPress admin backend generated many duplicated images with different ratios.

duplicated images in back end FTP view

Solution?

the solution to this was quite simple, only use the media uploader to upload the main featured image, this is the image which is shown on the front end of the website as main header image, this way if you decide to change the theme in the future, this will not have any effect on any featured images.

Now if anyone is planning on uploading several images for 1 blog post without generating many duplicates, guys this can be easily done, simply make a folder in your root websites directory, call it images, and upload all the images in there manually, then just copy and paste the URL link into your WordPress website, more info on this below;

As you can see above this is the main root folder, create an image folder in your root folder called images and then create different subcategories inside, the URL leading to your images would be “www.allseobasics.com/images/wordpress/example-folder-layout.jpg” note if you place the “http:// or https://” in front of the image and copy and paste the whole URL link into WordPress editor same as URL is shown below, this text will automatically update itself and transform into the selected image in that file path (URL)

https://allseobasics.com/images/wordpress/example-folder-layout.jpg

 

What do you need to do?

Rember the featured image should always be uploaded using the media uploader for best non-breaking WordPress results, it’s ok if it generates duplicates, it’s for the best performance of your website.

Any extra images which you may want to include on any pages, don’t use the back end media uploader, instead, use the FTP as shown above.