# Modern CSS with Tailwind: Image\_pack\_tag

**URL:** <https://forum.devtalk.com/t/modern-css-with-tailwind-image-pack-tag/7326>\
**Category:** PragProg Customers\
**Tags:** book-modern-css-with-tailwind\
**Created:** [24 February 2021 02:49 UTC](https://forum.devtalk.com/t/modern-css-with-tailwind-image-pack-tag/7326 "2021-02-24T02:49:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mung](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mung/32/2506_2.png) [@Mung](https://forum.devtalk.com/u/Mung)\
**Post date:** [24 February 2021 02:49 UTC](https://forum.devtalk.com/t/modern-css-with-tailwind-image-pack-tag/7326/1 "2021-02-24T02:49:16Z")

</div>

Title: Modern CSS with Tailwind: exception raised on image\_pack\_tag (page 4)

The text in the book about this helper leaves much to be desired:

\<%= image\_pack\_tag(“media/images/music.svg”, size: “100x100”) %\>

_(For what it’s worth, image\_pack\_tag is a Rails and Webpacker thing; you may_  
_need to do something else to find the image.)_

Where should the image be found? Due to the exception I can’t see what image\_pack\_tag returns in the way of HTML. Do I need to change where the image is located? Do I need to change the url? Where is the media directory located?

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [7 March 2021 17:04 UTC](https://forum.devtalk.com/t/modern-css-with-tailwind-image-pack-tag/7326/2 "2021-03-07T17:04:31Z")

</div>

What exception do you get? `image_pack_tag` returns an HTML `img` tag with a source URL that goes through Webpacker to get the location of the image.

Exactly what you’d need to do in the general case depends on how your media files are set up in your app.
