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

Image :: Convert the classic editor content to a block editor content create a non-responsive image issue #137

Open
faisalahammad opened this issue Feb 11, 2024 · 0 comments

Comments

@faisalahammad
Copy link

Describe the bug
When content created using the classic editor is converted to the block editor (Gutenberg), the image will not be responsive. Gutenberg wraps the image using a <p> tag, which causes the issue.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new post using the classic editor.
  2. Convert the post into Block editor.
  3. Check the post image from frontend.
  4. See the non-responsive image issue.

Expected behavior
The image should be responsive for all devices.

Screenshots
post content image

Quick Fix:
Adding the following CSS will resolve the issue.

.entry-content img {
  max-width: 100%;
}

Final Output:
Responsive image preview

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

No branches or pull requests

1 participant