OllieWP / ollie

A finely-crafted WordPress block theme by Mike McAlister
https://olliewp.com
GNU General Public License v3.0
334 stars 44 forks source link

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

Open faisalahammad opened 3 months ago

faisalahammad commented 3 months ago

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