Sunday, December 7, 2008

Bug: Publishing Image aka RichImageField

Problem:
In certain cases the RichImageField renders an HTML encoded image. It just renders image tags but doesn't render the image.

Workaround:
You have to build a webcontrol that inherits from RichImageField and decode the HTML.

Source: Publishing Images are shown in encoded Html/text instead of showing the image - temporary solution

2 comments:

Brent Railey said...

I found the real culprit:

The Field's SchemaXml must include the following attributes:

RichText="TRUE"
RichText="FullHtml"

If these are missing from the field definition on the pages library, it will emit encoded html.

Vivek said...

I was able to workaround the same issue:-)

http://vivek-soni.blogspot.com/2009/05/oob-publishing-image-field-with.html