Hello all,
I’m running into a recurring issue with Speedy & Jcogs image that I’m wondering if anyone else has solved.
It seems that the parse order of the {exp:speedy:fragment ..} tag and the {exp:jcogs_img:pair..} tag don’t play nice together. I have found that I have to escape jcogs tags inside of speedy fragment tags. We are migrating a site from CE Cache with CE Image over to Speedy & jcogs image, and this issue is coming up. I’m about half way through it, but wondering if there is some other way I can tell speedy to parse the internal tags before caching? Or, set the order of the jcogs tag to happen before speedy fragment? Here’s an example:
{exp:speedy:fragment
key="video_feed_card"
tags="video_feed"
url_override="{channel_short_name}/{entry_id}"
ttl="{global:ttl_1_day}"
driver="{global:env_speedy_driver}"
}
...
{exp:speedy:escape}
{exp:jcogs_img:pair allow_scale_larger="yes" src="{video_image}" width="370" height="250" crop="yes" fallback_src="/images/uploads/default_image.jpg" save_type="jpg" quality="{gv:thumbnail__quality}"}
{made}
{/exp:jcogs_img:pair}
{/exp:speedy:escape}
...
{/exp:speedy:fragment}THE FIX:
We can bypass this problem by adding parse="inward" to the fragment tag, and then I don’t need to use the {speedy:escape} tag pair.
{exp:speedy:fragment
key="video_feed_card"
tags="video_feed"
url_override="{channel_short_name}/{entry_id}"
ttl="{global:ttl_1_day}"
driver="{global:env_speedy_driver}"
parse="inward"
}I am posting here after successful debugging on EE Slack.
Please follow up if you have any related suggestions or if this helped you!
Sorry, the code editor and markdown is not working as expected, so the code above looks a bit strange.
Rowan
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.