I have an old Avada site and used Toolset to create this property listing website.
Each property has an image gallery and on the individual pages, the -scaled.jpg images loads fine, see hidden link
However, on the overview page hidden link the Swiper Gallery is built using the Avada Shortcode. While it loads the images fine, the Toolset shortcode part of it to crop the images is not working, which results in the galleries using the full width 10+ MB images 🙁
This is my code
[fusion_images picture_size="auto" hover_type="none" autoplay="no" columns="1" column_spacing="0" scroll_items="" show_nav="yes" mouse_scroll="no" border="no" lightbox="no" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="search-results" id=""]
[wpv-for-each field="wpcf-image-gallery"]
[fusion_image image="[types field='image-gallery' output='raw' size='medium' resize='crop' width='312' height='208'][/types]" image_id="[types field='image-gallery' output='raw' ][/types]|full" /]
[/wpv-for-each]
[/fusion_images]
Hello,
In Toolset image field shortcode, you can not use both attributes in the same time:
- output='raw'
- size='medium'
Please try to modify the shortcode from:
[types field='image-gallery' output='raw' size='medium' resize='crop' width='312' height='208'][/types]
To:
[types field='image-gallery' size='medium' resize='crop' width='312' height='208'][/types]
And test again.
More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#image
Will it still output the raw url because the Avada shortcode needs the raw url for the [fusion_image] shortcode.
You can try attribute url="true", for example:
[types field='image-gallery' size='medium' resize='crop' width='312' height='208' url='true'][/types]
When I removed output='raw' then the image would not load, it displayed some data64 code as the src.
But the url='true' allowed me to use the correct cropped image.