Remove Legacy Duplicate Images and keep the Thumbnail - WordPress

  Рет қаралды 1,700

Web Squadron

Web Squadron

15 күн бұрын

Get your 2 Code Snippets to;
1) Only Load the Original and Thumbnail 150 Images
2) Get rid of previously loaded images' duplicated versions
....here from the Snippets Pack: learn.websquadron.co.uk/#free...
NOTE: Before adding New Snippets
1. Always take a Backup
2. Preferably Export a Full Backup
3. Test on a Staging Site.
If you have many images then running this could slow down your site as it is resource intensive.
👉 Grab our $1 Business Packs: learn.websquadron.co.uk/#packs
👉 WordPress Hosting: be.elementor.com/visit/?bta=2...
👉 The Pro Page Builder: be.elementor.com/visit/?bta=2...
Need 1-2-1 Support: learn.websquadron.co.uk/#support
Join our Facebook Group: / websquadron
Get Code Snippets Pro: r.freemius.com/10565/3304295/

Пікірлер: 48
@websquadron
@websquadron 10 күн бұрын
NOTE: Before adding New Snippets 1. Always take a Backup 2. Preferably Export a Full Backup 3. Test on a Staging Site. If you have many images then running this could slow down your site as it is resource intensive.
@aminvalipoor2061
@aminvalipoor2061 12 күн бұрын
nice thanks
@gastondearaujo9203
@gastondearaujo9203 12 күн бұрын
so nice!! fantastic help! thanks! regards from Uruguay!
@websquadron
@websquadron 12 күн бұрын
You're welcome!
@edywerder
@edywerder 11 күн бұрын
Another brilliant and helpful video!!!
@websquadron
@websquadron 11 күн бұрын
Take a backup first :)
@OtisBurgos
@OtisBurgos 13 күн бұрын
Brother these code snippets are so legendary lol. I've been watching your videos recently and, man, God bless you! My websites are infinitely better because of the resources and knowledge you are sharing. God bless you bro! Keep it up.
@StooCambridgeArtist
@StooCambridgeArtist 13 күн бұрын
What a fantastic code snippet! Thanks Imran, appreciate you sharing this.
@QuaverloveStudio
@QuaverloveStudio 13 күн бұрын
We asked... you answered. Then you have the nerve to ask "... who the heck am I?" You must have a lot of corn in your diet, cross you're a-maize-ing! Thanks, Imran, for another well handy snippet.
@Jimsoda
@Jimsoda 12 күн бұрын
Can’t tell how long I have waited for something like this. Thanks!!!!
@websquadron
@websquadron 12 күн бұрын
Any time! Make sure you take backups before using :)
@quiatimet
@quiatimet 13 күн бұрын
Thank you for this! Please keep up the good work!!!
@gabrielk5497
@gabrielk5497 13 күн бұрын
This is glorious!!! Thankssssssss
@WisefocusdesignsAu
@WisefocusdesignsAu 12 күн бұрын
Great code Imran, thanks for sharing this. As a variation on this, what would you suggest for controlling the size of images so that even the original is removed leaving a more optomised size when uploading? This question is really for when the client, who would be uploading their own images for a blog post ,and who don't understand image sizes or types, and we want to control how much storage is used. The idea being that if they uploaded a large image file, the image is converted to the largest preset size and the original is deleted.
@websquadron
@websquadron 12 күн бұрын
That's tricky as it could be very subjective. Should be able to modify the Snippet to remove the original, but leave the thumbnail and a certain size say 200px width. But that would need testing.
@szocshanna
@szocshanna 12 күн бұрын
When I turned on the snippet I got an error: Too Many Requests - The user has sent too many requests in a given amount of time. After a while I was able to log in to the site but everything became very slow, after I managed to disable the code snippet plugin, the speed of the site was restored. The images were deleted anyway, only the 150*150 and the original one remained, but for some reason when the plugin is activated the site becomes unusably slow. I only activated the 2 snippets in the video.
@websquadron
@websquadron 12 күн бұрын
How many images did you previously have in your database?
@websquadron
@websquadron 12 күн бұрын
PS once it is run, you don't have to leave it activated as it will have done the removal thus nothing more to remove.
@szocshanna
@szocshanna 12 күн бұрын
@@websquadron wasn't too much, my hosting provider banned me for 10 minutes after I was able to log in
@Properture
@Properture 12 күн бұрын
Where is the code snippets on your website? I don't find it...
@websquadron
@websquadron 12 күн бұрын
learn.websquadron.co.uk/#freepacks - did you open the Snippets Pack and import the bundle?
@5minutesplan
@5minutesplan 13 күн бұрын
Can you suggest best multi language translation plugin... I am using Google translet but really not happy with it.
@1958moxon
@1958moxon 10 күн бұрын
I have downloaded the zip file gone into code snippets / tools / selected the json file, pressed the import file, after a few seconds the box reverts to no file chosen but none of the snippets appear to have been added. What am I doing wrong please?
@websquadron
@websquadron 9 күн бұрын
And you've definitely unzipped the zip file? Difficult to be sure.
@websquadron
@websquadron 9 күн бұрын
If it makes you feel better, in the next 7 days, I will be adding each snippet individually so that you can take what you want rather than the whole bundle.
@1958moxon
@1958moxon 6 күн бұрын
@@websquadron yes, uploaded the json file
@1958moxon
@1958moxon 6 күн бұрын
@@websquadron Thanks will try again then.
@wgm247
@wgm247 13 күн бұрын
Now just imagine just one more code snippet that scans the website to ensure if any images are set to medium or large then that particular image isn't deleted for that size. This way, no website images break and only those used remain. Holly grail !
@websquadron
@websquadron 13 күн бұрын
Yup still trying to crack that one
@tchazanov
@tchazanov 12 күн бұрын
I used this snippet and my site froze so I wasn't even able to log into the dashboard. The only way was to disable code snippets and remove it. I would now have to install a fresh copy and try to find all of the code snippets that I used before :(
@websquadron
@websquadron 12 күн бұрын
Did you take a backup first as I recommended? I stress-tested this and it was fine for me on multiple sites.
@warblog6165
@warblog6165 10 күн бұрын
I ran this snippet 12 hours ago and have not been able to get into the backend since. I did have a massive amount of images [ my website backed up was 13 GB - I took Imran’s advice and backed up ] could it still be running as the front end is functioning just fine ! Not being able get into the backend makes if difficult to restore if that is what I need to do. I am defiantly not throwing mud just looking for any bright ideas here before I ask a general question on the forums. I am an 80 year old who does this to keep my mind active having two commercial site and seven for charities.
@websquadron
@websquadron 10 күн бұрын
@@warblog6165 Sorry to hear that. 13GB sounds like a lot. See this video where you can put Code Snippets into Safe Mode: kzbin.info/www/bejne/mmi4qZuJo6h0Y8kfeature=shared Then you can enter the site and deactivate or remove the Snippet. Note that you do need to have access to the backend Files and Databases that may be via your host depending on your host. Also double check with your host if you struggle there. Backups and automated exports of websites is always a saviour with any new code/plugin.. I use All in One Migration to send daily full exports of my sites to my One Drive.
@websquadron
@websquadron 10 күн бұрын
@@warblog6165 Not sure if my reply got through. Sorry to hear that. 13GB sounds like a lot. See this video where you can put Code Snippets into Safe Mode: kzbin.info/www/bejne/mmi4qZuJo6h0Y8kfeature=shared Then you can enter the site and deactivate or remove the Snippet. Note that you do need to have access to the backend Files and Databases that may be via your host depending on your host. Also double check with your host if you struggle there. Backups and automated exports of websites is always a saviour with any new code/plugin.. I use All in One Migration to send daily full exports of my sites to my One Drive.
@warblog6165
@warblog6165 10 күн бұрын
@@websquadron That sounds really good Imran, very many thanks for taking the time and I was sorry to have troubled you. After posting the query I ran it through my ChatGPT who did offer a few solutions so I was able to get back to sleep. I greatly admire all the work you do; I still believe you need a ‘buy me a coffee’ widget somewhere - you have to eat!
@RetoB1976
@RetoB1976 13 күн бұрын
Hey Imran, thanks for those snippets. So, do you recommend to keep the thumbnail 150, as in your course you said to nil all sizes?
@websquadron
@websquadron 13 күн бұрын
I do like to set at 0 and have no issues but some prefer to use 150 so I’m covering all bases :)
@RetoB1976
@RetoB1976 13 күн бұрын
@@websquadron excellent, will probably leave it at 150 and use your script. Thank you, Imran!
@emilyemr2591
@emilyemr2591 13 күн бұрын
this is a good way to nuke a whole ton of images you have been using for years. need something to eliminate images that are not being used. i tried meow and it deleted lots or images that were in use, good thing i backed up!
@websquadron
@websquadron 13 күн бұрын
Yup, that's why you need backups and use with caution. Removing unused images is a bugbear.
@phkoon
@phkoon 13 күн бұрын
Hello there, Imran! I wasn't able to open the pack on click, had to right-click and open it in new tab. Don't know if it's an issue only on my end or from yours, just to let you know Also thank you, the second snippet is a goddamn life-changer, and I've been looking for this for a while now
@websquadron
@websquadron 13 күн бұрын
Hi - I just clicked and opened. Let me know if you still have issues.
@phkoon
@phkoon 13 күн бұрын
@@websquadron All working correctly now here too! You have a great week ahead
@truthninja298
@truthninja298 12 күн бұрын
Uhhh more importantly…..Someone better tell me where to get those animated Star Wars pictures.
@websquadron
@websquadron 12 күн бұрын
Grey Darth - from TikTok
6 Websites Web Designers Need to Use
15:00
Stephen Wise | DemandFlow
Рет қаралды 14 М.
Governor Sindh typescript quiz preparation Part 5 || Ninja learners
30:05
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 34 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 76 МЛН
Зачем он туда залез?
00:25
Vlad Samokatchik
Рет қаралды 3 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 12 МЛН
The 5 Plugins you DO NOT need on your Wordpress Website!
4:45
Web Squadron
Рет қаралды 4,6 М.
Outside with Comfort Zone || A day out in Hitchin
19:45
Kirsty and Briony's Comfort Zone
Рет қаралды 6 М.
23 AI Tools You Won't Believe are Free
25:19
Futurepedia
Рет қаралды 2 МЛН
Democratic Party factional war
33:28
The Duran
Рет қаралды 35 М.
Stop THOSE Duplicate Images in WordPress - Code Snippet
3:00
Web Squadron
Рет қаралды 1,4 М.
New $500/Day Method | AI Affiliate Website in MINUTES!
18:30
Make Money with Stacy La
Рет қаралды 145 М.
Rank On First Page Google With Claude 3.5 SEO Extension
7:13
ambITious
Рет қаралды 33 М.
Triggle #настольныеигры #boardgames #games #игры #настолки #настольные_игры
0:48
Двое играют | Наташа и Вова
Рет қаралды 8 МЛН
«План на новые бутсы» 💥 | #shorts
0:52
Филипп
Рет қаралды 1,1 МЛН
Это самый лучший подарок в ее жизни!
0:33
😳Ooops 😳 #littos
0:29
Littos Media
Рет қаралды 14 МЛН
🤣Хитрый План Папы #shorts
0:18
@gordey.bogdanov
Рет қаралды 2,4 МЛН