We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Remove <img > from RSS

How Do I?

lbj56's avatar
lbj56
5 posts
8 years ago
lbj56's avatar lbj56

Need to only include the img src URL in my feed. Using the following variables:

{thumbnail} and {photo} both output “” /

Example: http://www.free-times.com/arts/rss_arts

Any advice would be appreciated! Thanks!

       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
8 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

Try {photo:file_url}

Additionally, here’s the documentation for this tag

       
lbj56's avatar
lbj56
5 posts
8 years ago
lbj56's avatar lbj56

Thank you for your response Pedro. {photo:file_url} did not work. We did upload the extract_image plugin which does the trick, except it adds a newline character which I need to figure out how to get rid of. Any advice? The newlines are being added before </thumbnail> and </link> inside <media></media>

www.free-times.com/arts/rss_arts_test

       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
8 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

The correct tag is actually:

{photo}{url}{/photo}

       
lbj56's avatar
lbj56
5 posts
8 years ago
lbj56's avatar lbj56

Hi Pedro, that did not work for me either. Any other advice/routes to suggest?

       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
8 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

I’ll be happy to help out, but first I need to know what fieldtypes {photo} and {thumbnail} are.

       
lbj56's avatar
lbj56
5 posts
8 years ago
lbj56's avatar lbj56

They are both .png or .jpg image files.

http://www.free-times.com/arts/rss_arts_test

Right now this:

{if thumbnail}<thumbnail>{exp:extract_image}{thumbnail}{/exp:extract_image}</thumbnail>{/if}
{if photo}<link>{exp:extract_image}{photo}{/exp:extract_image}</link>{/if}

Outputs:

<thumbnail>
<img src="http://www.free-times.com/images/site/arts/CFW-red-carpetTN.jpg" alt=""  />
</thumbnail>
<link>
<img src="http://www.free-times.com/images/site/arts/CFW-red-carpet.jpg" alt=""  />
</link>
       
Pedro Guimaraes's avatar
Pedro Guimaraes
170 posts
8 years ago
Pedro Guimaraes's avatar Pedro Guimaraes

I just tested this on 2.x and 3.x and it works fine (assuming thumbnail is a File Field):

{if thumbnail}<thumbnail>{thumbnail}{url}{/thumbnail}</thumbnail>{/if}
       
lbj56's avatar
lbj56
5 posts
8 years ago
lbj56's avatar lbj56

Ah ok, the images are not being attached as field types. But I am still trying to determine how they are being attached.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.