How to automatically insert an image in product description using liquid?

Hi gang,

Im trying to insert an image in the middle of the product description.

But i want that to be automatic so here i am trying to mess with liquid.

{% if product.description contains "x" %}
{% if product.media.size > 2 %}
{% assign image = product.images[2] | img_url: 'large' %}
{{ "x" | prepend: image }}
{% endif %}
{% endif %}

But it just returns the image url

any help?

Welcome gangster,

You can do something like below to show the image.


Rules and basics for new gangsters can be found here

Hey Jayvin,

How would i go about integrating that code on the code i showcased?