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

Jetpack acceletaror causes image blurriness in Coblocks Logos & Badges block #13882

Closed
kathrynwp opened this issue Oct 29, 2019 · 3 comments
Closed
Labels
[Closed] Duplicate Duplicate of an existing issue. Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" [Feature] Photon aka "Image CDN". Feature developed in the Image CDN package and shipped in multiple plugins [Type] Bug When a feature is broken and / or not performing as intended

Comments

@kathrynwp
Copy link
Member

kathrynwp commented Oct 29, 2019

Steps to reproduce the issue

  1. Go to a self-hosted site, or a site hosted on WordPress.com running a third-party plugin or theme
  2. Make sure the Jetpack site accelerator (aka CDN/Photon) is active:

Jetpack ‹ WP Engine Test Site — WordPress

  1. Activate the Coblocks plugin - note that this is already installed on newer WordPress.com sites running a third-party plugin or theme
  2. In a new or existing post or page, insert a Logos & Badges block
  3. Upload images to the block - sample images can be downloaded from the test post: https://kathrynwp.wordpress.com/5422-2/
  4. View the page or post on the front end

What I expected

Image should be sharp

What happened instead

Images are blurry

WP Engine Test Site-1

  1. Now turn off the Jetpack accelerator
  2. View the page or post on the front end

What happened

Images are sharp

WP Engine Test Site

Reported by WordPress.com user, refs 2456734-zen 16300834-hc

@kathrynwp kathrynwp added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Asset CDN labels Oct 29, 2019
@matticbot matticbot added the Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" label Oct 29, 2019
@jeherve jeherve added [Feature] Photon aka "Image CDN". Feature developed in the Image CDN package and shipped in multiple plugins and removed [Feature] Asset CDN labels Oct 30, 2019
@jeherve
Copy link
Member

jeherve commented Oct 30, 2019

Do you think you could copy the HTML generated by the block, when Photon is active vs. not active?

@jeherve jeherve added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Oct 30, 2019
@kathrynwp
Copy link
Member Author

Certainly!

Photon active (images blurry)

<div class="wp-block-coblocks-logos"><div class="wp-block-coblocks-logos__row"><div style="width:50%"><img src="https://i2.wp.com/zoonini.wpengine.com/wp-content/uploads/2019/10/cropped-logo-metade-2.png?w=50%25" alt="" data-id="84" data-width="50%" data-recalc-dims="1"/></div><div style="width:50%"><img src="https://i2.wp.com/zoonini.wpengine.com/wp-content/uploads/2019/10/cropped-circle-05-512x514.png?w=50%25" alt="" data-id="86" data-width="50%" data-recalc-dims="1"/></div></div></div>

The problem seems to stem from this sort of thing:

https://i2.wp.com/zoonini.wpengine.com/wp-content/uploads/2019/10/cropped-logo-metade-2.png?w=50%25

This renders the image at 50px, which is then upsized back to 393px, resulting in the blurriness.

Photon not active (images sharp)

<div class="wp-block-coblocks-logos"><div class="wp-block-coblocks-logos__row"><div style="width:50%"><img src="http://zoonini.wpengine.com/wp-content/uploads/2019/10/cropped-logo-metade-2.png" alt="" data-id="84" data-width="50%"/></div><div style="width:50%"><img src="http://zoonini.wpengine.com/wp-content/uploads/2019/10/cropped-circle-05-512x514.png" alt="" data-id="86" data-width="50%"/></div></div></div>

@jeherve jeherve added [Closed] Duplicate Duplicate of an existing issue. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Oct 30, 2019
@jeherve
Copy link
Member

jeherve commented Oct 30, 2019

Interesting. This is most likely a duplicate of #9833.

I wonder if it may be worth bringing this up to the Coblocks folks, to see if there is a way they could use pixel values at all times instead of percentages in their blocks:
https://github.com/godaddy/coblocks/blob/master/src/blocks/logos/logos.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Closed] Duplicate Duplicate of an existing issue. Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report" [Feature] Photon aka "Image CDN". Feature developed in the Image CDN package and shipped in multiple plugins [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

3 participants