Keyword

Cache Image build/rebuild and enabling

  • Abderrahim
  • Abderrahim's Avatar Topic Author
  • Offline
  • New Member
More
14 years 8 months ago #77608 by Abderrahim
Cache Image build/rebuild and enabling was created by Abderrahim
Hi
I'm using the k2, but i have shocked by a very large cache folder size, it's possible to add allow and disallow images resizing like ?:
Item XLarge image width (in px) [ 900 ] [chkbox] [enabled/disable]

and if possible a button for rebuilding a missing images from "src" folder

thank you!

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

More
14 years 7 months ago #77609 by Marty Peet
Replied by Marty Peet on topic Cache Image build/rebuild and enabling
Is there anyone who can help with this? I've just downloaded one of my sites using JoomlaPack and installed it on my local network, download was 47Mb. I installed the k2 component and made a number of changes which included category and item images. Ran JoomlaPack thinking I was happy with the changes and would upload the new site, the site file is now 64Mb, an increase of 17Mb. I've gone over all the images that I created/added to the site and their combined size is just over 1Mb. I have had a look at my media/k2/items/cache folder and imagine my surprise when I noted the size of it was 18Mb!!! As above, is there a way to stop the auto creation of all other image sizes? OR is there a way to migrate the site without having to move the cache folder?

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

  • Abderrahim
  • Abderrahim's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #77610 by Abderrahim
Replied by Abderrahim on topic Cache Image build/rebuild and enabling
I've >1 Gbyes of cache images, and, I've two choices

0) creating a script for removing undesired images.
1) hacking into source code for stopping generation of cache images.

finally I've choosing "hacking into source", and disabling it, by just commenting PHP code, and now has worked fun k2 generate to me just size XS, S =~ 1kbyte

good luck!

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

More
14 years 6 months ago #77611 by Marty Peet
Replied by Marty Peet on topic Cache Image build/rebuild and enabling
gee, thanks for the help Adrabi!!! I found a script/hack in the forums that rebuilds the cache when/if images or the entire cache folder are removed, same place you've commented out the rebuild/create image functions I imagine. The weird thing with this function is I can't figure out the logic behind it, meaning the reasoning behind having the function in the first place and, in the second instance, implementing it the way it has been?

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

  • Abderrahim
  • Abderrahim's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #77612 by Abderrahim
Replied by Abderrahim on topic Cache Image build/rebuild and enabling
you're welcome!

I found a script/hack in the forums that rebuilds the cache when/if images or the entire cache folder are removed,

0) you want create a new images in cache (folder) if it's removed?
1) or you disable generating of every source image (src folder) to 6 cache (cache folder) images?

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

More
13 years 9 months ago #77613 by j37h3r
Replied by j37h3r on topic Cache Image build/rebuild and enabling
What is the code to disable the cache?

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

More
13 years 5 months ago #77614 by Angelo Romeo
Replied by Angelo Romeo on topic Cache Image build/rebuild and enabling
Hi

Please  you could post the changes you have made or tell me which files I need to change.

thanks

-Angelo

Adrabi Abderrahim said:

I've >1 Gbyes of cache images, and, I've two choices
0) creating a script for removing undesired images.
1) hacking into source code for stopping generation of cache images.

finally I've choosing "hacking into source", and disabling it, by just commenting PHP code, and now has worked fun k2 generate to me just size XS, S =~ 1kbyte

good luck!

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

More
13 years 5 months ago #77615 by Nurruk
Replied by Nurruk on topic Cache Image build/rebuild and enabling
I do have the same problem. Would be great, if you could help us.

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

  • Abderrahim
  • Abderrahim's Avatar Topic Author
  • Offline
  • New Member
More
13 years 5 months ago #77616 by Abderrahim
Replied by Abderrahim on topic Cache Image build/rebuild and enabling
Hi,this post in January 20, 2010, sorry I've forget place of code, maybe the code is changed in new versions,but you can search in K2 code by using any tool for words “Large” and “XLarge” etc... and disable code that generate them by commenting it, maybe (I don't remember) you can do it, in K2 options by changing images sizes for Large, XLage, etc... to “0” or “-1” and give a new images size ~1kbytes.you can see here : www.writingyourdreams.com/tips-and-tutorials/components/k2-cck-tutorials/part-3k2-layout/item/75-k2-item-image-options-parametersAhh, Hack is needed for replacing defaults images example: “XLage” by “Medium”, if you don't do it you can't see images because, them size is very small.Example:See here in source : www.google.com/codesearch?q=XLarge+package%3Ahttp%3A%2F%2Fjoomlaworks%5C.googlecode%5C.com&origq=XLarge&btnG=Search+Trunk

K2/components/com_k2/templates/default/item.php

208: <span class="itemImage"> 209: <a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" 


Good luck!

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


Powered by Kunena Forum