Solved

image will not display in RSS feed

Posted on 2011-03-02
5
2,187 Views
Last Modified: 2013-11-18
Hi,

Someone else setup an RSS feed for the company however it does not work correctly as the images will not display in browser or aggregator. I tried to fix using the <image> tag however still doesnt work.

Can someone take a look at the code?

thanks
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0" xmlns:c="http://base.google.com/cns/1.0" xmlns:i="http://purl.org/rss/1.0/modules/image">
<channel>
<title>Womens Caps</title>
<description>Womens Caps</description>
<link>https://url</link>
<item>
<g:id>1289</g:id>
<title>women's cap</title>
<description>text</description>
<g:image_link>url</g:image_link>
<i:image>
<i:url>url</i:url>
<i:title>women's cap</i:title>
<i:link>url</i:link>
</i:image>
<c:was_price type="string"/>
<g:price>10.00</g:price>
<link>url</link>
</item>
</channel>
</rss>

Open in new window

0
Comment
Question by:jecommera
  • 3
5 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 250 total points
ID: 35023075
From what I read, the <image /> tag should have three child elements and can only occur under the <channel /> tag:

    http://www.w3schools.com/rss/rss_tag_image.asp
0
 

Author Comment

by:jecommera
ID: 35023206
so - it does?

<i:image>
<i:url>url</i:url>
<i:title>women's cap</i:title>
<i:link>url</i:link>
</i:image>
0
 

Author Comment

by:jecommera
ID: 35026227
Anyone got any ideas? :)
0
 
LVL 3

Assisted Solution

by:wwwdeveloper2
wwwdeveloper2 earned 250 total points
ID: 35051340
Looks like to me that you are not actually outputting the url to the image location on the server.  It just literally says url

<g:image_link>url</g:image_link>
<i:image>
<i:url>url</i:url>

Shouldn't it have something like

<g:image_link>http://www.yoursite.com/</g:image_link>
<i:image>
<i:url>http://www.yoursite.com/productimage.jpg</i:url>

Is there maybe something wrong with your query that is outputting the feed? - Maybe it can't grab the real data for the image url?

Just some thoughts.  If you have more questions, let me know.

Good luck
0
 

Author Comment

by:jecommera
ID: 35054928
thanks,

@kaufmed: I know what you mean now, you are saying that you cannot place an image in the <item> tag

@wwwdeveloper2: 'url' is just a placeholder for the actual url.

So it appears that you cannot place an image in there. I have found a workaround seeing that you can place html inside the <description> tag therefore you can place an image in there however this is not ideal as one of our affiliates is using this feed and therefore cannot adjust the element contents.

There must be another way around this seeing that you have all those great RSS feeds on other sites.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adjust the position 3 70
XML Removal- Powershell 4 33
Create animated movies for web page 18 118
Create PowerShell 2-Dimensional Array From XML Configuration File 6 26
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question