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

Fixed post images with WP 6.7 #2458

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open

Conversation

girishpanchal30
Copy link
Contributor

@girishpanchal30 girishpanchal30 commented Nov 28, 2024

Closes #2457

Summary

In this PR, I've fixed the post images issue with the latest version of WordPress.

Checklist before the final review

  • Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Nov 28, 2024
@girishpanchal30 girishpanchal30 linked an issue Nov 28, 2024 that may be closed by this pull request
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Nov 28, 2024
@pirate-bot
Copy link
Contributor

pirate-bot commented Nov 28, 2024

Bundle Size Diff

Package Old Size New Size Diff
Animations 271.41 KB 271.41 KB 0 B (0.00%)
Blocks 1.56 MB 1.56 MB 0 B (0.00%)
CSS 100.89 KB 100.89 KB 0 B (0.00%)
Dashboard 204.59 KB 204.59 KB 0 B (0.00%)
Onboarding 161.1 KB 161.1 KB 0 B (0.00%)
Export Import 97.78 KB 97.78 KB 0 B (0.00%)
Pro 423.65 KB 423.65 KB 0 B (0.00%)

@pirate-bot
Copy link
Contributor

pirate-bot commented Nov 28, 2024

Plugin build for c46f7e3 is ready 🛎️!

@pirate-bot
Copy link
Contributor

pirate-bot commented Nov 28, 2024

E2E Tests

Playwright Test Status:

Performance Results serverResponse: 249.55, firstPaint: 493.85, domContentLoaded: 1527.05, loaded: 1527.85, firstContentfulPaint: 3578.35, firstBlock: 8000.35, type: 14.87, minType: 12.11, maxType: 20.42, typeContainer: 8.95, minTypeContainer: 7.97, maxTypeContainer: 11.03, focus: 36.41, minFocus: 29.68, maxFocus: 45.43, inserterOpen: 22.72, minInserterOpen: 20.49, maxInserterOpen: 30.43, inserterSearch: 0.69, minInserterSearch: 0.6, maxInserterSearch: 0.82, inserterHover: 2.87, minInserterHover: 2.52, maxInserterHover: 4.47, listViewOpen: 143.45, minListViewOpen: 131.62, maxListViewOpen: 158.95

Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel left a comment

Choose a reason for hiding this comment

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

One problem with eliminating --image-ratio is that it will make this option broken

Screenshot 2024-11-28 at 10 28 59

@girishpanchal30
Copy link
Contributor Author

@Soare-Robert-Daniel I’ve reverted the --image-ratio CSS and resolved the issue through an alternative approach.

Solution

WordPress 6.7 introduced the new feature, Auto Sizes for Lazy Loaded Images, which caused an issue with the post grid block images. To address this, I’ve removed the auto sizes by using a filter for the post grid block.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post images are not showing correctly
3 participants