No video

Code Snippet to Stop Wordpress Creating Duplicate and Unused Images in your Database

  Рет қаралды 4,394

Web Squadron

Web Squadron

Күн бұрын

Even after you set the Wordpress Media Settings to be 0 for many sizes, you may find that they are still be created in your Wordpress Database which can build over time for no good reason.
Code:
websquadron.co...
We love to create - share - respond - and deliver.
🧐 Learn with our Mastery Modules: websquadron.co...
🔗 All of our Important Links: websquadron.co...
😃 Join our Facebook Group: / 3309523509284305
😃 Get Code Snippets Pro: r.freemius.com...
😃 Get Elementor Pro: be.elementor.c...
😃 Boost your KZfaq Analysis: www.tubebuddy....
👕 Get our Merchandise: websquadron.co...
🥹 Support us: paypal.me/Webs...
Hire us to work on your Website!
💌 info@websquadron.co.uk
👩‍💻 Visit websquadron.co.uk

Пікірлер: 43
@PicSta
@PicSta Жыл бұрын
Absolutely a jewel of a snippet. Useful for so many websites out there, especially the image heavy ones or big shops. Great job & video.
@websquadron
@websquadron Жыл бұрын
This video now supersedes this one as it addresses images that are already loaded into the database. kzfaq.info/get/bejne/jsmKma54p9OugnU.html
@maddy1mymk
@maddy1mymk Жыл бұрын
I can only imagine how quickly this grows in an ecommerce website 😱. Thanks Imran!
@websquadron
@websquadron Жыл бұрын
Totally
@digwillhachi
@digwillhachi Жыл бұрын
This should be an option in base wordpress to be honest. Good info 👍
@GoExploreGreece
@GoExploreGreece Жыл бұрын
A fantastic tip Imran. As someone who already has over 1200 images which are growing weekly, I'll apply this over weekend.
@ericblackwell3727
@ericblackwell3727 Жыл бұрын
This should be an option in WP imho, but thanks for a great tip. I have a multisite with 250 sites on it that this is going to prove VERY useful for.
@websquadron
@websquadron Жыл бұрын
Glad it was helpful!
@Jason_1010
@Jason_1010 Жыл бұрын
Very useful, thanks Imran 👍
@amiralbatal
@amiralbatal Жыл бұрын
i love this kind of content VERY VERY much
@websquadron
@websquadron Жыл бұрын
This video now supersedes this one as it addresses images that are already loaded into the database. kzfaq.info/get/bejne/jsmKma54p9OugnU.html
@amiralbatal
@amiralbatal Жыл бұрын
@@websquadron Of course, WordPress is already not the best performance CMS, so any tricks helps WordPress have better performance will be very good content.
@amiralbatal
@amiralbatal Жыл бұрын
by the way 2 2 or 3 days i have tried media cleaner be meo apps (i think) it was very good
@soicybunny
@soicybunny Жыл бұрын
golden
@antonichristian5845
@antonichristian5845 Жыл бұрын
cheers Imran... really wish Wordpress wouldn't do this by default or at least give us an option to turn it off... can end up with a ton of crap in the database...
@websquadron
@websquadron Жыл бұрын
Totally agree
@jcnation5393
@jcnation5393 Жыл бұрын
Imran, then there will be the "proper size" issue on pagespeed insight, don't you think?
@websquadron
@websquadron Жыл бұрын
Not always if you're methodical about what you remove.
@genethompson9154
@genethompson9154 Жыл бұрын
Would this delete these images too - or just prevent them from being loaded?
@websquadron
@websquadron Жыл бұрын
Won't delete but will stop it happening again. It's a pain that it does it in the first place.
@deanazelinova5103
@deanazelinova5103 Жыл бұрын
Hello, thank you for nice tip. I have a problem to save snippet in Elementor custom code section. Button save just doesn't react. { Where Do You Want to Display Your Code?}. It's just a Elem. bug?
@antonichristian5845
@antonichristian5845 Жыл бұрын
use a plugin like codesnippets as suggested by Imran in the video... you can also add it to your themes functions.php file... i know that elementor custom code can accept js and css... not to sure about php...
@websquadron
@websquadron Жыл бұрын
Add to Code Snippets as in the video. It's a much safer way to do it.
@deanazelinova5103
@deanazelinova5103 Жыл бұрын
@@websquadron I don't know why instal other plugin, when in Elementor Pro exist already. So I added to functions on child theme and it works. Thanks for idea.
@danjepi82
@danjepi82 Жыл бұрын
Thanks! All done but then, uploading a new media, WP still create 3 new sized images: 100x100, 300x300, 600x600, so strange...
@websquadron
@websquadron Жыл бұрын
This video now supersedes this one as it addresses images that are already loaded into the database. kzfaq.info/get/bejne/jsmKma54p9OugnU.html
@audunjemtland8287
@audunjemtland8287 7 ай бұрын
@@websquadron Do you have a video on after the code is inserted and it still makes duplicates? It still makes 2 duplicates here. x100 and x300. (They are checked off)
@OnkelFolie
@OnkelFolie 8 ай бұрын
The Snippets doesnt work for me, i tried so many things but i still get duplicates
@websquadron
@websquadron 8 ай бұрын
It works for me though.
@siddiqtalks
@siddiqtalks Жыл бұрын
Aoa Imran is it possible to take some consultation ? It’s about calendly/elementor integration
@websquadron
@websquadron Жыл бұрын
Hi. Sure, we have 2 options - 30mins or 1hr. websquadron.co.uk/services/
@siddiqtalks
@siddiqtalks Жыл бұрын
@@websquadron site seems down
@websquadron
@websquadron Жыл бұрын
@@siddiqtalks Just checked and it's all fine. Or you can email me on info@websquadron.co.uk
@dingadanga8653
@dingadanga8653 Жыл бұрын
Aqesome, is there a way to remove the existing images that have being created , prior to applying the code ?
@websquadron
@websquadron Жыл бұрын
Manually but I’m going to clarify tomorrow with a better method
@dingadanga8653
@dingadanga8653 Жыл бұрын
@Web Squadron I looked at media cleaner, but that can open a can of worms on an ecommerce site as it can break the site. Would be great to have a plugin which scans your whole website and keeps only the images in use across responsive view. I know you can restore using meoaps media cleaner, but in even a small ecommerce website with 1000 products, it can be time consuming and then a pain if ir breaks etc
@dingadanga8653
@dingadanga8653 Жыл бұрын
@Web Squadron could you tag me if you have a better way please 😁👌💯🤙
@websquadron
@websquadron Жыл бұрын
@@dingadanga8653 yup I’m looking into an alternative way
@erling5148
@erling5148 Жыл бұрын
It still makes different sizes images
@websquadron
@websquadron Жыл бұрын
Yup hold on - I will do a video to clarify this as some sizes will still be generated by WP
@erling5148
@erling5148 Жыл бұрын
@@websquadron it also depends on the theme you use this pluging seems to be working ThumbPress - Stop Generating Unnecessary Thumbnails 2869 images processed 19178 thumbnails removed 0 thumbnails regenerated it shows al the sizes that will be generated, including the sizes your theme sets, you can just copy these sizes and add these to your snippet
@audunjemtland8287
@audunjemtland8287 7 ай бұрын
@@erling5148 So one cannot use this generally on any theme? What is it that differs?
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 21 МЛН
When you discover a family secret
00:59
im_siowei
Рет қаралды 25 МЛН
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН
managed to catch #tiktok
00:16
Анастасия Тарасова
Рет қаралды 49 МЛН
AI Built My App and It's INSANE! (Galileo, Claude, Cursor)
16:38
AI in practice
Рет қаралды 11 М.
The MOST private browser
8:14
Naomi Brockwell TV
Рет қаралды 885 М.
Decrease Siteground Inodes WITHOUT Deleting Files, Emails or Upgrading!
14:04
The Giant sleep in the town 👹🛏️🏡
00:24
Construction Site
Рет қаралды 21 МЛН