Enhancement: Improving Image resulting code in the Markdown parsing library

Open
#45,734 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
css, php
Domain
content, frontend

Research direction

Start by locating the Markdown parsing entry point that produces the shown img HTML and inspect how image attributes and styling are assembled. Compare the current output with the reported oversized-image example; done means rendered images no longer overflow their container, using the requested max-width behavior and evaluating object-fit containment.

Written by the indexing model from the issue text.

Description

[Feature] Markdown [Status] Needs Author Reply Enhancement
Impacted plugin

None / Other

What

Images doesn't have any width limitations

How

We have introduced the markdown parsing library in our synced handbooks (as part of the whole integration), and it seems that the resulting HTML for the images, when the images are too big, tend to break the page

Example

Image

Ideally, the markdown parser should add at least a max-width:100% and maybe, a object-fit:contain to avoid this unnecessary overflows.

Dominant language
PHP
Stars
1.9k
Forks
913
Avg merge
1d 18h
Merged PRs (30d)
809

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/jetpack

All issues in Automattic/jetpack

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.