getdave / wp-intervention

On-demand image manipulation for WordPress via the Intervention Library.
26 stars 7 forks source link

Lets see if I got this right... #5

Closed paaljoachim closed 7 years ago

paaljoachim commented 7 years ago

Hi

I run the web site: https://www.easywebdesigntutorials.com The uploads folder contains 2688 images. 1 original and additional 4 duplicates in thumbnail, medium, large and another defined size through the theme.

It would be great to just use the original image and remove all the duplicates.

The dilemma today is that using a small % for an huge image upload for a thumbnail the thumbnail would still be a "big" kb size.

I am looking into creating a new tutorial for this specific issue. Perhaps the WP Intervention plugin could do the magic that is needed to defining sizes in a "soft" (% size way) instead of using a "hard" (duplicate the original image into many smaller images way). So that I can define sizes through the functions file and the plugin would automatically on the fly create the image sizes I need. Also adjusting the kb sizes of the images.

I would like to personally test this out for my tutorial site and see how it works.

stuartjnelson commented 7 years ago

Hi @paaljoachim,

With a quick google I have these articles that will help you stop WordPress from generating is default image sizes for each image;

  1. https://paulund.co.uk/remove-default-wordpress-image-sizes - filter
  2. http://www.wpbeginner.com/wp-tutorials/how-to-prevent-wordpress-from-generating-image-sizes/ - through settings

Intervention can defiantly do the "soft" resizing you are looking for. Id suggest you have a read of their docs - http://image.intervention.io/. In terms of "adjusting the kb sizes of the images" this would be down to many factors one of which would be reducing the actual dimensions of your image. I suggest some Googling around image optimisation and using tools such as https://imageoptim.com/mac - or one of the many WordPress plugins that does the same job.

Hope this helps.

getdave commented 7 years ago

Hi.

Stu is right WP Intervention may help here. However note that by default it will generate files on disk (it uses this as a cache for optimisation purposes) but only at the size you specify when you need it. It wont generate a tonne of useless images.

Alternatively you can disable the caching behaviour (see docs) as a global option but be aware that Intervention will then generate images ON DEMAND which would likely place undue load on your server.

Best of luck with the article.

paaljoachim commented 7 years ago

Thank you @stuartjnelson and @getdave!

I look forward to experimenting on a few sites. I'll report back here if/when questions arise.

The bottom line is that I am working on getting a real life solution to the duplicate images issue filling up the uploads folder.