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

change src for invoice logo image #1326

Merged
1 commit merged into from Aug 14, 2018
Merged

change src for invoice logo image #1326

1 commit merged into from Aug 14, 2018

Conversation

ghost
Copy link

@ghost ghost commented Aug 8, 2018

What?

Logo img in the invoice is missing. This change will add logo img to the invoice

Screenshots

Before

screen shot 2018-08-08 at 10 23 24 am

After
Original logo size

screen shot 2018-08-10 at 5 08 16 pm

Optimized

screen shot 2018-08-10 at 5 09 02 pm

Specified Dimensions

screen shot 2018-08-10 at 5 10 02 pm

@bigbot
Copy link

bigbot commented Aug 8, 2018

Autotagging @bigcommerce/storefront-team @davidchin

@@ -6,7 +6,7 @@
<div class="Invoice">
<h1>
{{#if settings.store_logo.image}}
<img class="header-logo-image lazyload" data-sizes="auto" src="{{cdn 'img/loading.svg'}}" data-src="{{getImage settings.store_logo.image 'logo_size'}}" alt="{{settings.store_logo.title}}" title="{{settings.store_logo.title}}">
<img class="header-logo-image lazyload" data-sizes="auto" src="{{getImage settings.store_logo.image}}" data-src="{{getImage settings.store_logo.image 'logo_size'}}" alt="{{settings.store_logo.title}}" title="{{settings.store_logo.title}}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is a lazy load image which will load the loading image first & then replace it will original image. Do we see anything in the console as to why the image is not loading ? Or else we completely remove lazy loading. See https://github.com/bigcommerce/cornerstone/blob/81d24b58633365ea1974e9d3e633111d66cc6d57/templates/components/common/store-logo.html

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into that and find out that this issue happens because of the printing (the image is not ready by the time the printing windows opened.
I delete the lazy load and used the same method as referenced, however, the code in the reference use lazy load as well so I should modify it according to the requirements.

@Ubersmake
Copy link
Contributor

💚

Copy link
Contributor

@Ubersmake Ubersmake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ghost ghost merged commit 62ade4c into bigcommerce:master Aug 14, 2018
@ghost ghost deleted the invoice_img branch August 14, 2018 00:28
Ubersmake added a commit that referenced this pull request Aug 14, 2018
This pull request was closed.
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

Successfully merging this pull request may close these issues.

None yet

3 participants