Codeinwp / Codeinwp/otter-blocks

Allow image alt and desc in Posts block

Open
#1,923 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

customer report new feature
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.

alt-desc

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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.