[wp-trac] [WordPress Trac] #32433: Add registered image sizes in WXR export file
WordPress Trac
noreply at wordpress.org
Mon May 18 21:26:43 UTC 2015
#32433: Add registered image sizes in WXR export file
--------------------------+-----------------------------
Reporter: joehoyle | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Export | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When a WordPress site is exported, attachments are also exported (though
only the original image url). If a user then imports that into a new
WordPress install, images will be generated for all registered image sizes
on the new blog.
If however, the exported site was running different image sizes, it will
potentially have references to those images in post content (e.g. `image-
322x422.png`); however, `322x422` is not a registered image size on the
new site. This will produce 404 images in the new post content.
This was acknowledged (though I don't think addressed) in #16984:
> A problem that might arise is if there are different image size settings
on the export and import sites. So an exported post might contain an image
img-200x200.jpg but the import site hasn't generated the appropriate size.
For the first patch I'm ignoring this and saying that it's up to the user
to ensure the settings are consistent. Potential future fixes include
importing options or generating the extra sizes on the fly
The user will typically not have control over image sizes either way (as
they have to be registered in code) - also the recipient of a WXR file
does not know the image sizes on the exported site.
It therefore seems logical to include image sizes somewhere in the WXR
file, so importers (the WordPress importer or otherwise) know what image
sizes to generate for all existing attachments.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32433>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list