Modern CSS with Tailwind: Image_pack_tag

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?

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.