#48706 closed defect (bug) (invalid)
Post export does not include srcset attributes
Reported by: | rogeriomoreira | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.3 |
Component: | Export | Keywords: | |
Focuses: | Cc: |
Description
Hi.
Since version 4.4, WordPress adds native responsive image support by including srcset and sizes attributes to the image markup it generates. However, when exporting the posts with the WordPress export built-in functionality these attributes are not included on the XML file.
Steps to reproduce:
- Create a new post containing one image;
- Inspect the post on the front-end and make sure the srcset and size attributes are there;
- Export the posts with the WordPress built-in functionality;
- In the XML file, these attributes are not there.
Happy to contribute with anything.
Change History (3)
#2
in reply to:
↑ 1
@
5 years ago
- Resolution set to invalid
- Status changed from new to closed
Replying to SergeyBiryukov:
Hi there, welcome to WordPress Trac! Thanks for the report.
This is probably intentional, as
srcset
andsizes
attributes are added by wp_make_content_images_responsive() at runtime viathe_content
filter, and are not saved to the database. This makes it easier to update image sizes for uploaded files in the future and regenerate thumbnails as needed.
Thanks. Didn't know about that filter, everything makes sense now :)
Hi there, welcome to WordPress Trac! Thanks for the report.
This is probably intentional, as
srcset
andsizes
attributes are added by wp_make_content_images_responsive() at runtime viathe_content
filter, and are not saved to the database. This makes it easier to update image sizes for uploaded files in the future and regenerate thumbnails as needed.