progapandist / evil_chat

Code for "Evil Front: Modern Front-end in Rails" 3-part tutorial: https://evilmartians.com/chronicles/evil-front-part-1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Images

meneerprins opened this issue · comments

What is the best way to include images in views/components? They don't seem to get included in the manifest.json when imported

Hi! There's an <%= asset_pack_path %>helper for Webpacker. You can choose either to keep your images in an img folder inside your frontend or store them inside the component's folder. You can read more about images at the very end of this Webpacker doc: https://github.com/rails/webpacker/blob/master/docs/assets.md

Also, next week we'll talk more about images in the final part of the tutorial. Good luck!