Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include a sample image to ensure that images handled by webpack are working #308

Closed
G-Rath opened this issue Jul 3, 2022 · 1 comment
Closed

Comments

@G-Rath
Copy link
Contributor

G-Rath commented Jul 3, 2022

The frontend-base variant adds a commented out example of how to use the image_pack_tag to use images that are meant to be handled by webpack:

body_open_tag_with_img_example = <<~EO_IMG_EXAMPLE
  <body>
      <%
        # An example of how to load an image via Webpacker. This image is in
        # app/frontend/images/example.png
      %>
      <%# image_pack_tag "example.png", alt: "Example Image" %>
EO_IMG_EXAMPLE
gsub_file "app/views/layouts/application.html.erb", "<body>", body_open_tag_with_img_example, force: true

While working on #307 I decided to try this to confirm that things were still working and found that the example is actually just completely busted regardless of if we're using webpacker or shakapacker.

I think in general it's a good idea to have this as an actual working example with a sample image

this is the sample image I was using

ruby-logo

@eoinkelly
Copy link
Contributor

Closed by #324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants