# Attachment\_fu - Problem in displaying image data from DB

**URL:** <https://www.ruby-forum.com/t/attachment-fu-problem-in-displaying-image-data-from-db/144917>\
**Category:** Ruby\
**Created:** [August 4, 2008, 11:16am UTC](https://www.ruby-forum.com/t/attachment-fu-problem-in-displaying-image-data-from-db/144917 "2008-08-04T11:16:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [August 4, 2008, 11:16am UTC](https://www.ruby-forum.com/t/attachment-fu-problem-in-displaying-image-data-from-db/144917/1 "2008-08-04T11:16:02Z")

</div>

Hi,

I am using attachment\_fu plugin to upload images to database(I am using  
“:storage =\> :db\_file”).

Now I want to read the image and display it in a web page.

I am able to read it correctly, but i don’t know how to display this  
read image in a webpage. Both send\_data and send\_file are for  
downloading the image.

I tried with “image\_tag” method but didn’t succeed.

Any suggestions are appreciated.

Thanks in advance…

---

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [August 4, 2008, 3:16pm UTC](https://www.ruby-forum.com/t/attachment-fu-problem-in-displaying-image-data-from-db/144917/2 "2008-08-04T15:16:37Z")

</div>

You can use send\_data with the :disposition parameter to make it  
inline. Just make sure you have the content type correct and it  
should work.
