Codeinwp / Codeinwp/otter-blocks
Allow image alt and desc in Posts block
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 198
- Forks
- 36
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 30
Description
What problem does this address?
A user asked on the forum how to display alt and desc for the images in the Posts block.
I can see the alt attribute without a value on the post featured image when using this block, and no desc. Below is an example of the HTML from the block.
<img fetchpriority="high" width="800" height="800" src="https://mljvyuvuhqlw.i.optimole.com/w:800/h:800/q:90/f:best/http://neve.stefancoti.com/wp-content/uploads/2020/03/neve-print-shop-29.jpg" class="attachment-large size-large" alt="" decoding="async">
What is your proposed solution?
Populate the value of alt and desc attributes of the featured image, with the ones from Media Library.
Reported here: https://wordpress.org/support/topic/how-do-you-add-image-desc-and-alt-text-for-images-that-show-in-the-posts-block/
Will this feature require documentation? (Optional)
No.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Posts block implementation and the code that renders its featured image. Check how the image data from the Media Library is received and compare it with the generated HTML shown in the issue. Done means the featured image includes the Media Library values for both alt and desc, with coverage for the block output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100