Skip to content
ferkesh.HOSTING

Trace a Stale WordPress Thumbnail to Its Attachment and Size

WordPress 64 переглядів Markdown

When the Media Library shows the updated original but a card still displays an older crop, follow the actual image selected by the browser before regenerating anything.

Workflow. Check browser currentSrc. Find attachment ID. Confirm requested size. Retest both widths.

Identify the content and file actually in use

Open a staging copy of the affected page and record the image element, currentSrc and candidate sizes in srcset. In the editor, determine the attachment ID and the chosen size. A content block can contain a fixed image URL, while a theme template may request a registered size dynamically.

Compare the original and derivative

For the known attachment, review the registered sizes and generated attachment metadata with the developer or host. A developer can use wp_get_attachment_image_src to examine the URL WordPress returns for a specific size. Compare it with the requested URL and the displayed image. If the URLs differ, inspect the block or cache layer first.

Rehearse a narrow repair

Keep a copy of the staging original and derivatives. If the right attachment is missing the target derivative, test WP-CLI media regenerate for that attachment and intended image size. Check the command's handling of previous thumbnails before running it because existing pages may link directly to older files. Compare the result at narrow and wide widths.

Expected result

The affected page selects the intended derivative and other pages using the attachment still work. Log the attachment ID, size and exact URL before scheduling a production repair.

Official references

Ferkesh Hosting. Last reviewed .

Ця стаття була корисною?

Спасибі за відгук!

Досі потрібна допомога?

Служба підтримки на зв’язку цілодобово з усього, чого ви не знайшли в базі знань.