Banner

Mass Resize of K2 Images Including Crop

Joomla! 2.5 Joomla! 3.0
K2 v2.6
Rate this item
(5 votes)
Mass Resize of K2 Images Including Crop
  • Price: € 10.00
  1. 12 Months Personal Support

    12 Months
    Personal
    Support
  2. Regular updates and bugfixes

    Regular
    updates and
    bugfixes
  3. Unlimited Domains usage

    Unlimited
    Domains
    usage

This plugin (System – Rebuild) is designed to do few things:

  • Give you the chance to resize all K2 images of certain or all types (XS, Small, Generic etc.). It works only for item images (not working for category images or avatars).
  • Give you the change to crop the height of these images during the process.  So all of your images (i.e. XS) will have the exactly same size.
  • You can control through the parameters which images you want to resize, what will be the new size, should it be cropped or not.
  • Install the plugin;
  • Go to Extensions -> Plugins and filter by system. Open the System – Rebuild plugin.
  • Select the field to make it Enabled.
  • There are four groups of parameters, set each of them:
  • First group is to which image sizes to make the rebuild (disabled for all by default). Select those image sizes you want to rebuild.
  • Second group allows you to set width of the images. You can define all of the widths here. Be aware that if you haven’t enabled the resize function for certain type (the first group), the width option for that image size (as well as for anything else) will not matter.
  • Third group allows you to select if you want to use cropping for each type of images. Again, this option will not be executed if you haven’t selected the resizing for that image type on the first group of parameters.
  • The fourth group of parameters is the height. It only matters if cropping is set to yes.
  • The fifth group of parameters allows a bit more advanced options. If you don’t know what you are doing, you better don’t touch there.

How it works?

What are the advanced options?

You may run the rebuild process for missing images only. For example if you have deleted some, only these will be rebuilt and all existing will be kept. This setting is disabled by default, meaning all images are rebuilt.

In case your web site has a lot of items, the process may take a lot of time and even result in timeout. Therefore we created two parameters to control the number of items to execute the script for. In example, if your web site gets an error after enabling the script, you could specify the minimum and maximum ID of the items to execute. That way you can resize these on batches. Both values should be different than 0 in order to be applied.

For example, if you enter the minimum ID to be 1 and the maximum to be 100 save the plugin and refresh the page, only the items with ID between 1 and 100 (including both) will get resized pictures. Then you could change the settings to 101 and 200 and so on. That way you can avoid the server overload.

When the resize is happening?

When the plugin is enabled and you load any page at the admin panel, it tries to resize all the images depending on your parameters set. Therefore, once you resize all the pictures, we recommend you to disable the plugin.

Possible issues:

Before enabling this plugin, we suggest you to turn your website offline for few minutes. And of course make a backup.

If you have a lot of items and a lot of images, the process could be killed due to timeout or memory overload. Therefore, if this happens or you expect it to happen, use the options to set minimum and maximum item ID so you could process them on batches.

Also a good idea could be to not enable the resizing for all image types at once. You could do that step by step.

For smaller sites, there should be no issues.

If you wish to use the cropping feature in the future, please check out our forum and the K2 patch offered there. This patch allows cropping during the upload, which will allows this process to happen only once (the current plugin does than on each page load at the administrative panel).