ChrisRAoW / mautic-rss-to-email-bundle

Mautic plugin to send emails from RSS
103 stars 23 forks source link

{feeditem:image} not displaying image #33

Closed winklevos closed 4 years ago

winklevos commented 4 years ago

I'm trying to push the content and image into separate sections and the image is included in the block from wordpress the image is displayed when using {feeditem:description} but {feeditem:image} is null. Is there anyway to make this work?

` test; https://test.category/xxx/

    <dc:creator><![CDATA[xxx]]></dc:creator>
    <pubDate>Tue, 14 Jan 2020 05:37:00 +0000</pubDate>
            <category><![CDATA[Uncategorised]]></category>
    <category><![CDATA[xx]]></category>
    <category><![CDATA[xx]]></category>
    <guid isPermaLink="false">https://test.category/?p=5138</guid>

                <description><![CDATA[<img width="1024" height="684" src="https://test.category/wp-content/uploads/2020/01/IMG_4777-1024x684.png" class="attachment-large size-large wp-post-image" alt="xx" srcset="https://test.category/wp-content/uploads/2020/01/IMG_4777-1024x684.png 1024w, https://test.category/wp-content/uploads/2020/01/IMG_4777-300x200.png 300w, https://test.category/wp-content/uploads/2020/01/IMG_4777-768x513.png 768w, https://test.category/wp-content/uploads/2020/01/IMG_4777-1536x1027.png 1536w, https://test.category/wp-content/uploads/2020/01/IMG_4777-930x620.png 930w, https://test.category/wp-content/uploads/2020/01/IMG_4777.png 1616w" sizes="(max-width: 1024px) 100vw, 1024px" /><p>xxxxxxx<a href="https://test.category/test/" class="" rel="bookmark">Read More &#187;<span class="screen-reader-text">xxxxxxx;</span></a></p>

The post xxx appeared first on xx.

]]>`

ChrisRAoW commented 4 years ago

@winklevos The image {feeditem:image} will only work when there is an enclosure or media tag in the feed. See documentation:

{feeditem:image} Returns: url of the image. Will check the enclosere and media tags of the xml.

winklevos commented 4 years ago

@ChrisRAoW apologies, thought my plugin was doing it, all resolved now. Great plugin!

ChrisRAoW commented 4 years ago

Thanks!