# Provide missing image

**URL:** <https://www.ruby-forum.com/t/provide-missing-image/173101>\
**Category:** Rails\
**Created:** [August 2, 2009, 7:54pm UTC](https://www.ruby-forum.com/t/provide-missing-image/173101 "2009-08-02T19:54:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![makire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@makire](https://www.ruby-forum.com/u/makire)\
**Post date:** [August 2, 2009, 7:54pm UTC](https://www.ruby-forum.com/t/provide-missing-image/173101/1 "2009-08-02T19:54:02Z")

</div>

Hi

I have an application where people can upload avatar-like images to  
the site. When I show the images I want to show a placeholder image if  
no image has been uploaded for that user.

I was thinking of overloading the image\_tag helper to check for  
existance and provide :default =\> “path/to/default/image” for the  
image to show in case the primary one does not exist.

So my questions are: Has anyone done something similar before and if  
so is there a gem or similar for public use?

Thanks in advance

Erik L.

---

<div class="post-metadata">

**Author:** ![makire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@makire](https://www.ruby-forum.com/u/makire)\
**Post date:** [August 2, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/provide-missing-image/173101/2 "2009-08-02T19:59:53Z")

</div>

Asked and answered. Looked through the Paperclip source and found the  
default\_url parameter. Thanks to Thoughtbot 🙂

/Erik
