Keyword

Cache on K2

  • Jose orlando de lima
  • Jose orlando de lima's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 8 months ago #109857 by Jose orlando de lima
Cache on K2 was created by Jose orlando de lima
Does anyone know how to reduce the size of the cache folders on K2 this media \ k2 \ items \ cache file because it generates many leaving the huge site (on the picture)

thank you

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #109858 by jean-philippe
Replied by jean-philippe on topic Re: Cache on K2
Hi Jose orlando de lima,

I don't know if it's possible to fix a size of the cache folder but..

in this directory.. it's all image that you use in K2 gallery and K2 image.

to reduce size, you can go in the K2 Parameters, tab Image and reduce the Quality (%) used when processing images.

You can also reduce width of item image that you don't use the size...

if you don't used medium image... you may put 1 in px example...

but if you do this... it's possible that the current images on your website will not be processed but the future ones should be.

Best regards

Emond, Jean-Philippe

Please Log in or Create an account to join the conversation.

  • Jose orlando de lima
  • Jose orlando de lima's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 8 months ago #109859 by Jose orlando de lima
Replied by Jose orlando de lima on topic Re: Cache on K2
Thanks Jean

It is possible to disable the pop up images.

I removed all images of articles K2, and zero cache again, now I'll use your tip.
Only e.g.
Before images with K2
Backed up with Akeeba - 119 mb
After images without K2
Backed up with Akeeba - 20 mb

thanks for the tip after I post the result

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #109860 by jean-philippe
Replied by jean-philippe on topic Re: Cache on K2
Hi Jose orlando de lima,

When you click on the front end image added by "images",

inside your template we have something like:
					
Emond, Jean-Philippe

Please Log in or Create an account to join the conversation.

  • Jose orlando de lima
  • Jose orlando de lima's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 8 months ago #109861 by Jose orlando de lima
Replied by Jose orlando de lima on topic Re: Cache on K2
Thanks Jean

I'll try

Please Log in or Create an account to join the conversation.

  • Jose orlando de lima
  • Jose orlando de lima's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 8 months ago #109862 by Jose orlando de lima
Replied by Jose orlando de lima on topic Re: Cache on K2
Hi Jean
I'm using the image size medium, but other sizes used only px (0), this solved my problem with cache.
Since the problem of image pop up, I saw your post on another, saying that should change My_Site/template/My_template/html/com_k2/template/default/item.php.
Also solved.

Thanks
Nice to meet to

Please Log in or Create an account to join the conversation.

  • Jose orlando de lima
  • Jose orlando de lima's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 7 months ago #109863 by Jose orlando de lima
Replied by Jose orlando de lima on topic Re: Cache on K2
Well I'll tell you how I solved the huge cache that generates K2, first answering the question why K2 generates this huge cache.
When you insert an image in an item (article) K2 it generates around 6 copies of the same images with different dimensions, to more than 6 copies?
These copies are used in different locations of the Project.
Images small commonly used as pre visualization in the form of inserting pictures and also the K2 index of items (articles) of K2.
Larger images are in use in category view, and also in item (articles) of K2 itself.
Well it did to solve a mixture of solutions indicated by JeanRocha (JoomlaClube Brazil) and by Jean Philippe (K2 Forum) guided me.

1 Enter each item of K2 and removed the images (turn zero whole cache)
2 Define the size of the image I wanted to use in my case medium size and the other set 0px
3 I went into each item of K2 reinserting each image in your particular item. Generating a cache with only a picture and five other pictures less than 2k.
4 I disabled the pop up images of items (by clicking it appeared only a white square and x, for the image used in the pop up as imagemXL was set to zero, no image)

I deleted the line of code in bold:

<A class = "modal" rel = "{handler: 'image'}" href = "<? Php echo $ this-> item-> imageXLarge;?>" Title = "<? Php echo JText :: _ (' K2_CLICK_TO_PREVIEW_IMAGE ');?> ">
<Img src = "<? Php echo $ this-> item-> image;?>" Alt = "<? Php if (! Empty ($ this-> item-> image_caption)) echo :: K2HelperUtilities cleanHtml ($ this -> item-> image_caption); else echo :: K2HelperUtilities cleanHtml ($ this-> item-> title);?> "style =" width: <? php echo $ this-> item-> imageWidth;?> px; height: auto; "/>
</ A>


Located in my_site/template/my_template/html/com_k2/template/default/item.php

Before
Size-generated backup with Akeeba Images enabled - 112.79 mb

After
Size-generated Akeeba backup with the changes and images enabled - 32.55 mb

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum