#7620
closed
defect (bug)
( fixed )
The issue of blurry images in the WordPress repository within plugins on the internal page.
|
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
|
|
Description
-
772x250 px -
1544x500 px
#plugin-banner-call-to-action-block-wppool { background-image: url(' https://ps.w.org/call-to-action-block-wppool/assets/banner-772x250.jpg?rev=2862263 '); } @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 120dpi) { #plugin-banner-call-to-action-block-wppool { background-image: url(' https://ps.w.org/call-to-action-block-wppool/assets/banner-1544x500.jpg?rev=2862263 '); } }
-
Disregard pixel density and consider pixel accuracy instead, for example: #plugin-banner-call-to-action-block-wppool { background-image: url(' https://ps.w.org/call-to-action-block-wppool/assets/banner-772x250.jpg?rev=2862263 '); } @media only screen and (min-width: 933px) { #plugin-banner-call-to-action-block-wppool { background-image: url(' https://ps.w.org/call-to-action-block-wppool/assets/banner-1544x500.jpg?rev=2862263 '); } }
-
Keep the pixel density, but write additional media queries that take into account the screen resolution. However, in this case, it will clutter the CSS code, so it's easier to use the first solution.
Attachments (1)
Change History (12)
#2
follow-up:
↓ 3
@
3 weeks ago
#3
in reply to: ↑ 2
@
3 weeks ago
Does the solution suggested here not work? (Apologies if I'm missing the point).
#4
@
3 weeks ago
-
Component changed from General to Plugin Directory -
Milestone Plugin Directory v3.0 deleted
#5
@
3 weeks ago
<div class="plugin-banner" id="plugin-banner-{id}"> <img decoding="async" fetchpriority="high" src="/banner-772x250.png? rev=2903066" srcset="/banner-772x250.png? rev=2903066 772w, /banner-1544x500.png?rev=2903066 1544w" sizes="(min-width: 900px) 1544px, 772px"> </div>
-
Fixes low res: https://d.pr/i/finypV -
Loads lower res on DPR = 1 and small viewport -
Loads higher res on DPR = 1 and larger viewport
-
-
Loads higher res for other devices: https://d.pr/i/fUxc8A
#7
@
3 weeks ago
wporg-plugins-2024: Update plugin banner styles. See: https://meta.trac.wordpress.org/ticket/7620 Props: alexodiy.