Skip to content
New issue

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

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

Already on GitHub? # to your account

Google Pay button doesn't load image #44

Open
ericghpham opened this issue Sep 18, 2019 · 1 comment
Open

Google Pay button doesn't load image #44

ericghpham opened this issue Sep 18, 2019 · 1 comment
Assignees

Comments

@ericghpham
Copy link
Contributor

ericghpham commented Sep 18, 2019

Ember apps with a rootURL can't load images for the Google Pay button because the button's background-image url doesn't account for rootURL. Here is an example on ember-square-payment-form's homepage, reproducible by enabling Google Pay with Ember Inspector.

Screen Shot 2019-09-18 at 12 21 18 PM

At the moment, ember-square-payment-form uses treeForPublic to put the images in the consuming Ember app's public folder under /assets/square-payment-form-images, which is the URL path prefix for the Google Pay button background images.

My temporary workaround is to add a class to the Google Pay button that applies the correct image url.

@deanpapastrat
Copy link
Member

Can you confirm that you have fingerprinting enabled for SVG files, @ericghpham?

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    fingerprint: {
      extensions: ['js', 'css', 'png', 'jpg', 'gif', 'svg']
    }
  });

  return app.toTree();
};

@deanpapastrat deanpapastrat self-assigned this Sep 29, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants