Remove Legacy Duplicate Images and keep the Thumbnail - WordPress

Sdílet
Vložit
  • čas přidán 7. 07. 2024
  • 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/
  • Jak na to + styl

Komentáře • 51

  • @websquadron
    @websquadron  Před 19 dny +1

    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 Před 21 dnem +1

    nice
    thanks

  • @gastondearaujo9203
    @gastondearaujo9203 Před 21 dnem +1

    so nice!! fantastic help! thanks! regards from Uruguay!

  • @edywerder
    @edywerder Před 20 dny

    Another brilliant and helpful video!!!

  • @OtisBurgos
    @OtisBurgos Před 22 dny +4

    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.

  • @QuaverloveStudio
    @QuaverloveStudio Před 21 dnem +2

    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.

  • @WisefocusdesignsAu
    @WisefocusdesignsAu Před 21 dnem +1

    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  Před 21 dnem

      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.

  • @Jimsoda
    @Jimsoda Před 21 dnem +1

    Can’t tell how long I have waited for something like this. Thanks!!!!

    • @websquadron
      @websquadron  Před 21 dnem

      Any time! Make sure you take backups before using :)

  • @StooCambridgeArtist
    @StooCambridgeArtist Před 22 dny +1

    What a fantastic code snippet! Thanks Imran, appreciate you sharing this.

  • @quiatimet
    @quiatimet Před 22 dny +1

    Thank you for this! Please keep up the good work!!!

  • @gabrielk5497
    @gabrielk5497 Před 22 dny

    This is glorious!!! Thankssssssss

  • @PetervanRemmen
    @PetervanRemmen Před dnem

    Hi Imran, great work. But did you delete the 'remove previous media' snippet? I can't find it when I import it.

    • @websquadron
      @websquadron  Před dnem +1

      Yup - it became unpredictable for some people in terms of their resources usage due to their images or hosting so I closed this down as the risk for some is tricky

    • @PetervanRemmen
      @PetervanRemmen Před dnem

      Can you send me the script to try it out on my own risk? Just do it on a test server.

  • @szocshanna
    @szocshanna Před 21 dnem

    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  Před 20 dny +1

      How many images did you previously have in your database?

    • @websquadron
      @websquadron  Před 20 dny +1

      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 Před 20 dny

      @@websquadron wasn't too much, my hosting provider banned me for 10 minutes after I was able to log in

  • @Properture
    @Properture Před 21 dnem

    Where is the code snippets on your website? I don't find it...

    • @websquadron
      @websquadron  Před 21 dnem

      learn.websquadron.co.uk/#freepacks - did you open the Snippets Pack and import the bundle?

  • @1958moxon
    @1958moxon Před 19 dny

    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  Před 17 dny

      And you've definitely unzipped the zip file?
      Difficult to be sure.

    • @websquadron
      @websquadron  Před 17 dny

      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 Před 15 dny

      @@websquadron yes, uploaded the json file

    • @1958moxon
      @1958moxon Před 15 dny

      @@websquadron Thanks will try again then.

  • @5minutesplan
    @5minutesplan Před 22 dny

    Can you suggest best multi language translation plugin... I am using Google translet but really not happy with it.

  • @wgm247
    @wgm247 Před 22 dny

    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 !

  • @RetoB1976
    @RetoB1976 Před 22 dny

    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  Před 22 dny +1

      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 Před 22 dny

      @@websquadron excellent, will probably leave it at 150 and use your script. Thank you, Imran!

  • @phkoon
    @phkoon Před 22 dny +1

    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  Před 22 dny +1

      Hi - I just clicked and opened. Let me know if you still have issues.

    • @phkoon
      @phkoon Před 21 dnem

      @@websquadron All working correctly now here too!
      You have a great week ahead

  • @tchazanov
    @tchazanov Před 20 dny

    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  Před 20 dny

      Did you take a backup first as I recommended?
      I stress-tested this and it was fine for me on multiple sites.

    • @warblog6165
      @warblog6165 Před 19 dny

      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  Před 19 dny +1

      @@warblog6165 Sorry to hear that. 13GB sounds like a lot. See this video where you can put Code Snippets into Safe Mode: czcams.com/video/d7UxhSnCA-g/video.htmlfeature=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  Před 19 dny

      @@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: czcams.com/video/d7UxhSnCA-g/video.htmlfeature=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 Před 19 dny

      @@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!

  • @emilyemr2591
    @emilyemr2591 Před 22 dny +2

    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  Před 22 dny

      Yup, that's why you need backups and use with caution. Removing unused images is a bugbear.

  • @truthninja298
    @truthninja298 Před 21 dnem

    Uhhh more importantly…..Someone better tell me where to get those animated Star Wars pictures.