CodeIgniter Forums

Full Version: Still having problem displaying images in IE7
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Frank Rocco[/eluser]
Hello,

Here is the code I use to display an image ina blob.
Code:
<?php print base64_encode($row->Picture)?>

IE 8 works fine, IE7 fails.

Is there a better way to show an image stored in a blob?

Thanks

Frank

El Forum

[eluser]xeroblast[/eluser]
try this:

in your controller
Quote:<?php
function showPicture()
{
header("Content-type: image/jpeg");
echo $row->Picture;
}
?>

in your view
Quote:<img src="&lt;?php echo site_url('controller_name/showPicture'); ?&gt;" />