Have your say in Community Polls: What was/is your greatest motivation to start your own business?

AppProxy: use of page_image

AppProxy: use of page_image

fbonizzi
Shopify Partner
3 0 0

I'm developing a Shopify App with App Proxy. In my backend generated html, which is working fine, I also add:

{% layout 'theme.liquid' %}
{% assign page_title = "A title" %}
{% assign page_description = "A nice description" %}
{% assign page_image = "My CDN image url" %}
{% assign image_url = "My CDN image url" %}

When deployed and rendered by the Shopify Shop, If inspect the generated page meta tags, I see that page_title and page_description are correctly placed into meta title and meta description, BUT page_image/image_url aren't rendered in og:image, ecc. They don't appear anywhere in the DOM.

 

I also checked some themes, and they believe like this:

{%- if page_image -%}
<meta property="og:image" content="http:{{ page_image | image_url }}">
<meta property="og:image:secure_url" content="https:{{ page_image | image_url }}">
<meta property="og:image:width" content="{{ page_image.width }}">
<meta property="og:image:height" content="{{ page_image.height }}">
{%- endif -%}

What am I doing wrong?

Replies 0 (0)