You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
URL rewriting in converted content per doc 08 §5 stage 5 and §6.2. Any url/src attribute pointing at the old site's wp-content/uploads/... is resolved through the attachment-map: strip ?ver= query string, look up source path, replace with new URL. Handles WP's per-size suffixes (image-1024x768.jpg) by stripping the suffix and resolving the base. Unresolvable URLs emit media_url_unresolved warning and the original URL is left untouched (will 404 visibly, with a logged warning).
Design reference
docs/08-migration-compat.md §5 stage 5, §6.2
Acceptance criteria
rewriteMediaURLs(tree, attachmentMap) walks the block tree
Replaces src/url/href attrs in core/image, core/gallery, core/cover, core/audio, core/video, core/file
Strips ?ver= and other query params before lookup
Handles size-suffix patterns (-NNNxNNN, -scaled) by stripping → resolving base
Multi-pattern URL detection: handles bare hostnames, protocol-relative, absolute, and CDN-fronted URLs (per §18 risk list)
media_url_unresolved warning emitted for unresolved URLs
Verification step samples 50 images and HEAD-checks them (per §18)
Summary
URL rewriting in converted content per doc 08 §5 stage 5 and §6.2. Any
url/srcattribute pointing at the old site'swp-content/uploads/...is resolved through the attachment-map: strip?ver=query string, look up source path, replace with new URL. Handles WP's per-size suffixes (image-1024x768.jpg) by stripping the suffix and resolving the base. Unresolvable URLs emitmedia_url_unresolvedwarning and the original URL is left untouched (will 404 visibly, with a logged warning).Design reference
Acceptance criteria
rewriteMediaURLs(tree, attachmentMap)walks the block treesrc/url/hrefattrs incore/image,core/gallery,core/cover,core/audio,core/video,core/file?ver=and other query params before lookup-NNNxNNN,-scaled) by stripping → resolving basemedia_url_unresolvedwarning emitted for unresolved URLsDependencies
#html-to-blocks, #media-migration
Complexity
M