Giorgi625 VIP
Total posts: 655
19 Oct 2017 19:48

So As all we know image fields has option to resize image in list and full view.

But what to do if in List view I need to have small image, in full view original or big image and I also need to display same records in module where I have different size.

For example I display in list view images with size 380x190, on full view it is 860x420, and in module it is 1920x960.

Image size for module is taken from list view size so if I don't want to have low quality images in module I need to disable image resizing in list view and for list view resize it to its div container size via css, but in this case it will load original images on list view pages and this pages may weight more then 4mb when same page weights max 1.5mb when image sizes are same as they display.

What can be done in this case?

Last Modified: 24 Oct 2017


pepperstreet VIP
Total posts: 3,837
19 Oct 2017 21:09

Hello Giorgi, here are related topics and Sergey's comment about Cobalt Image Helper:

Hope this helps.


Giorgi625 VIP
Total posts: 655
22 Oct 2017 13:32

Thanks pepperstreet

echo '<img src="' . $item->fields_by_id[ID]->value[image] . '">';

This solutions worked for me.


Sergey
Total posts: 13,748
24 Oct 2017 06:15

I see 2 ways.

  1. Change picture size with CSS in the module, by giving to module CSS class.
  2. I would create custmom output template and change resize parameter in module. I only do not know how to detect that it is triggered in module not in component.
Powered by Cobalt