Image duplicating

Posted in: Newsmag
Post count: 27

Hi ,

I’m using Newsmag already few years without big problems, but lately while maintaining/tidying up the server, I noticed that for one added image (I use 651×500 in the post) there are over 20 duplicate images of different sizes.
This is only visible on the server. There is probably some conflict with Imagify by optimization, but unfortunately I have been waiting for a response from them for two days.
Has anyone had this problem or can give me any suggestions on what to do?

Regards
Peter

Post count: 9544

Usually good to go into the theme settings and deactivate all image module sizes not actually being used. I try to limit mine to no more than (4) module types to limit this issue. Also, go into the WP default media settings and put 0 in all three items to not have those sizes built.

Post count: 27

I don’t imagine to reduce to 4 blocks / modules incl. mobile, but I try to optimize it. Thanks.

Post count: 9544

I basically have 3 sizes for home page plus slider; and then use one of those in sidebar; and one in sidebar with no images. For posts we use inline image not featured image, so the image we upload *is* the image used in template. Heh, so maybe we have 5 modules. Better than 12 + the 3 from WP default!

Post count: 35449

Hello DJ Promotion,
Our theme blocks are using thumbs to display the featured image and when an image is added in media it will be create a thumb for each module that is enabled in the theme panel – https://forum.tagdiv.com/newsmag-theme-thumbs/
As suggested by simchris, it is recommended to activate in the theme panel only the thumbs on the modules you use, the rest can be deactivated in order not to create thumbs for unused ones. Also, in the present situation, after the plugins are deactivated, a thumb regeneration plugin can be used to delete the ones that are not used.
Thank you!

Post count: 27

Hi Calin,

Thanks for the feeddback.
I followed Chris’s suggestion and it seems to be ok, I have a huge amount of unused images on the server. Will the plugin remove them in the current situation? I use Imagify, but I don’t see here the “delete unused” option.

The problem here is more unusual because I migrated the Uploads folder to Amazon S3. The WP Media(Joom United) plugin should have deleted the files on my server, but it didn’t. So now I have the same (a lot) files on my server and on AWS S3.

BTW. one more question:
What folder should we set so that Imagify works properly? In my opinion it should be: > … wp-content/uploads/
not > ….wp-content/themes/Newsmag/

Post count: 27

Hi simchris,
Just one (and last) question:
I have two sizes in the Block settings: 681×0 and 681×400.
Do I delete this second one?
Gnerally I’m using in the post 681×500, but I don’t see it in the Block settings. So I inderstand in case of height=0 it doesn’t contro this size?

Post count: 9544

Hi, yes, I think the 681×0 is to auto size the height, since width is necessary to “fit” in say the boxed layout.

Post count: 35449

Hi DJ Promotion, simchris is right, the thumb is 696×0, it only controls the width of the image, and the height is automatic to match the width.
Also, the path to the images is the default one … wp-content/uploads/
not > ….wp-content/themes/Newsmag/
Thank you!

Post count: 27

Yes, it’s clear after simchris feedback. Finally I think, I defined the problem.
I just used default post template with 640×0 size, then changed to Post style 3 with 681×0.
When I used Imagify optimization I didn’t see it, but now when I use Smush plugin I see errors because I’m using 681×0 in default template.

How to get out of this?

Regards

Post count: 20685

Hi,

What kind of errors are you seeing exactly?

I see you’re doing some cleaning concerning the thumbnails. I can recommend this plugin https://wordpress.org/plugins/regenerate-thumbnails/ which has an option to remove the unused thumbs. It will create/keep the sizes which you have activate in the theme panel, and remove the rest of them. This should free up a lot of space, assuming you had all the theme thumbs active for a long period of time.

Actually to know which thumbs you are using, you could do it like this. Deactivate all the thumb sizes in the theme panel. Then browse the website, and note the sizes which will be displayed like so https://prnt.sc/L0MHsyYjZBvL Then activate just those.

Post template 3 uses the 681 X 0 size for the featured image. If you use this template, that size should be active.

Once you know which sizes are needed, then you can use the regenerate thumbs plugin. That would be all basically.

But if there are any errors, please mention a few more details.

Thank you!

Post count: 27

Cool Simion ???
it’s very good idea.

BTW
I can’t find in the theme panel the palce to add the placeholder which fills empty images in searches. Like here:
https://prnt.sc/ocHu_v8AyIIP

Do you know where is it?

Regards

Post count: 35449

Hello,
The image for placeholder can be set from the Newsmag > theme panel > block settings > thumbs – https://i.imgur.com/UtRILGB.png
Thank you!

Post count: 27

Thnaks,
I’ve already found it.

I have general most important problem with images.

Have you encountered such a problem?

1. In many cases (not all) regenerate-thumbnails plugin inform me:
The fullsize image file cannot be found in your uploads directory at…
and I see this image in the directory.

2. The regenerated image generate additional image sizes which I don’t see in BLOCK SETTINGS > THUMBS SIZES

I’m using cdn synchronized via WP media with AWS and for optimalization by Smush.

Regards

Post count: 35449

Hi,
Can you please try those plugins – https://wordpress.org/plugins/regenerate-thumbnails/https://wordpress.org/plugins/force-regenerate-thumbnails/
Normally there should be 3 extra thumbs that are made by WordPress – https://i.imgur.com/RDm5dEE.png
Thank you!

Post count: 27

Thanks, finally I diagnosed the problem. Smush has compressed me a part of original images so WP “don’t see” these originals by regenerating of thumbnails.

Do you have an idea how to find these originals images, wchich has been compressed?
It’s too much images to check one by one. May be in sql database?
I have all original images offline. So when I upload one of them and add to the post then Theme “see” this file by regenerating.

Post count: 35449

Hello,
Unfortunately, I do not know exactly how you can remove the compressed images by Smush and display only original images (you can try to get some more info from plugins developers). From what I know this plugin has an option to delete original images after those are compressed, so in this case I think the only solution will be to use the original images that you have saved locally.
Thank you!

Post count: 27

That’s right, I’ve found the backup of media folder. For all information: I changed SMUSH for EWWW , incl. Force regeneration thumbnail plugin. In this way I see in media folder all of the lost files with information: No URL to this media…
So now, the only one way is to upload from back up and add manually.
It takes addtional work but resolves the problem.

Thanks

Regards

Post count: 12

Hello All,

Finally I seem to be in a place where I can probably get my answer / resolution, which is similar to the discussion. However, I would want to go a step further.
1. Is it a good idea to disable the wordpress thumbnails by putting ‘0’ in the media settings (are these at all used in the newspaper theme)
2. How can I know what all (exact) sizes am I using across the newspaper default pro theme. So that I can disable the rest of the sizes.
3. Once I have achieved the above two solutions, how would I delete the now unnecessary images files without risking the site.

Thanks to all.

Post count: 35449

Hi glamsham,

1. Yes, this can be done, there are also plugins that can do this and can be used.

2. Also, in the theme panel thumbs sections let on only the thumbs that you are using (and default eventually the default sizes – https://i.imgur.com/OFGjPwW.png) – https://forum.tagdiv.com/theme-thumbs/
Unfortunately there is no system that will display the size that are enabled, but it can be done vice-versa, you can disable the thumbnails from the theme panel and check on the website to see those thumbs that are requested, it will be displayed like this – https://i.imgur.com/oWVNbbU.png and enabled those sizes in the theme panel – https://i.imgur.com/UkxiaA0.png
Also if it is a flex, you can changed the thumb on module – https://i.imgur.com/jqXWXqN.png

3. This can be done using a regenerate plugin that can delete unused thumbnails. A plugin that can be used it’s this one – https://wordpress.org/plugins/regenerate-thumbnails-advanced/

Thank you!

Post count: 27

does anyone know why such a strange situation has now appeared:

empty fields in images in the incognito browser.

However, in my one (in my desktop computer) it shows normally, but with an error in the image:
“FORCED TO WRONG SIZE 196X126, NATURAL SIZE IS: 300X194”
https://prnt.sc/Jn3_dic_OYyX
This is the BLOCK 16

and inthe incognito browser there is:
https://cdn.djpromotion.com.pl/wp-media-folder-dj-raport/wp-content/uploads/2023/12/newsmag_1812.jpg

Here is not the same BLOCK 16 , but something different.

On the mobile devices looks fine.

Thanks

Post count: 9544

Might be browser caching issue?

Post count: 27

Yes, simchris, it’s an issue with WP Rocket lazy loading.

I’m using Cloudfront and different plugins. I’m afraid it is too much of all.

Regards

Viewing 23 posts - 1 through 23 (of 23 total)
You must be logged in to reply to this topic.