Keyword

Stop K2 image resizing

More
8 years 1 week ago #152130 by Rocio
Stop K2 image resizing was created by Rocio
Hello!
For my website I need only one size image, so I would like to stop the auto-resizing and only have one image per item, because it makes images that occupy space in my disk.

Is there any way to do this?

Thanks!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #152137 by Krikor Boghossian
Replied by Krikor Boghossian on topic Stop K2 image resizing
You can use an extrafield for your item's image (requires coding) or you can upload images through the media tab. The latter option can be found in K2's image tab.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 1 week ago #152144 by Rocio
Replied by Rocio on topic Stop K2 image resizing
Thanks Krikor!

I was wondering if touching the code it not possible neither?

Or is there a way to group images in folders, like:

/media/k2/items/cache/small
/media/k2/items/cache/medium
/media/k2/items/cache/large
/media/k2/items/cache/extra-large


So I can delete the ones I dont want
...

Thanks!

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

More
8 years 1 week ago #152150 by Javi Mata
Replied by Javi Mata on topic Stop K2 image resizing
If don't wanna touch the code you can asign a size image in the category, put this size for the size that you need, for example, if need display the images to 600px can asign in the category, the Option Item image options, put 600 in a size, for example Medium size... so, if you select in the item or in the list of item the size Medium of this category the image must be display to 600px...

if you upload the images before this need upload again :-S

Twitter: @Javi_Mata
Web: www.javimata.com

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #152176 by Krikor Boghossian
Replied by Krikor Boghossian on topic Stop K2 image resizing
Unfortunately no,

The only way to stop K2 from generating thumbnails is to either use an image extrafield or use an image from the server.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 1 week ago #152195 by Javi Mata
Replied by Javi Mata on topic Stop K2 image resizing
Krikor, the option $item->imageGeneric show the original image?

Twitter: @Javi_Mata
Web: www.javimata.com

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #152278 by Krikor Boghossian
Replied by Krikor Boghossian on topic Stop K2 image resizing
Not really,

It will show you the generic image, the one used in date/ search/ tag results.
If you want to show the original image something like this will do the trick
echo JURI::base(true).'/media/k2/items/src/'.md5("Image".$item->id).'.jpg';

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 1 week ago #152288 by Joe Campbell
Replied by Joe Campbell on topic Stop K2 image resizing
Someone needs to create a plugin to replace K2 images with extra fields.

Extra fields provides maximum flexibility, as you can use them for list images, item images, metadata, attachments, and more.

This way you do not have to worry about image processing (messing with quality and/or file names).

The only thing missing, and I will say it until I am blue in the face, is a "File" extra field type, so that you can upload and select files types such as doc, spreed sheets, pdfs, etc.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 1 week ago #152311 by Krikor Boghossian
Replied by Krikor Boghossian on topic Stop K2 image resizing
Btw, I have added the code required to replace the image with an extrafield if anyone needs it.
github.com/kricore/Advanced-templating-with-K2/blob/master/_inc/cheatsheet.php#L78-L82

Also I will +1 the file type request as well.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 1 week ago #152313 by Joe Campbell
Replied by Joe Campbell on topic Stop K2 image resizing
Cool - I would recommend providing the code with an extra field caption for those who want to go all out :)

As I often tell people, I use extra fields for 90% of my website - what can I say, I'm a CMS Control Freak - LOL

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


Powered by Kunena Forum