Page 1 of 1

We solve the issue of photo

Posted: Wed Jan 22, 2025 3:21 am
by prisilabr03
Is correct, but what happened? The plugin duplicated all images with thumbnails in WebP format. And now the hosting hosted not , photos with thumbnails, but more than thousand images! The thing is that WordPress, the template and some plugins create reduced copies of each uploaded photo. Therefore, photo on the hosting stores another to photos this is the case with this particular site to display them on different types of devices. For example, it looks like this original on top, copies below The task was as follows Disable image generation. This can be done using the Disable Generate Thumbnails.

Plugin At this stage, generation for new articles. Delete the contents of the cambodia telegram data array sizes from the table postmeta in the row wpattachmentmetadata in the database Delete all copies of images from the hosting. Leave only original images. I ran out of space on my hosting because of the large number of photos on my WordPress site. What should I do? ATTENTION! If you decide to use my method described in this article and shown in the video, then before using the codes that I provide below, make a copy of the uploads.

Folder and the database, or just the postmeta table of your WordPress site. Do not show the srcset attribute. This code is only necessary if you do not intend to delete records in the database code below. function removemaxsrcsetimagewidth maxwidth return false addfilter maxsrcsetimagewidth, removemaxsrcsetimagewidth function wdodisablesrcset sources return false addfilter wpcalculateimagesrcset, wdodisablesrcset Disable Widgets Block Editor addfilter usewidgetsblockeditor, returnfalse Code to delete the list of sizes in the database. Insert the code into funtions of the template. After saving, delete the code. global wpdb query SELECT metavalue, metaid FROM wpdbpostmeta WHERE metakey wpattachmentmetadata result wpdbgetresultsquery foreach result as item.