Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

image will not display in RSS feed

Posted on 2011-03-02
5
Medium Priority
?
2,379 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1000 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 1000 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

704 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