-
Notifications
You must be signed in to change notification settings - Fork 383
Closed
Labels
BugSomething isn't workingSomething isn't workingChangeloggedWhether the issue/PR has been added to release notes.Whether the issue/PR has been added to release notes.EmbedsWS:CoreWork stream for Plugin coreWork stream for Plugin core
Milestone
Description
Bug Description
The Imgur post embed generates AMP tag, it uses post id as data-imgur-id, and it creates incorrect embed URL: https://imgur.com/2q6AS6i/embed?pub
so it’s not displayed on the AMP page.
<amp-imgur
data-imgur-id="2q6AS6i"
layout="responsive"
width="540"
height="633"
>
</amp-imgur>
In the official AMP documentation, there is no information available for Imgur post embed.
https://amp.dev/documentation/components/amp-imgur/
And there is a merged PR to add the support for Imgur posts:
ampproject/amphtml#23829
Expected Behaviour
The Imgur post embed should generate data-imgur-id
as a/<post_id>
. It generates the correct embed URL https://imgur.com/a/2q6AS6i/embed?pub
.
<amp-imgur
data-imgur-id="a/2q6AS6i"
layout="responsive"
width="540"
height="633"
>
</amp-imgur>
Steps to reproduce
- Edit/Create WordPress post.
- Add an Imgur post URL. eg. https://imgur.com/gallery/2q6AS6i
- Submit the post.
- View it on AMP mode
Screenshots
Additional context
- WordPress version: 5.4
- Plugin version: 1.5.3
- AMP plugin template mode: Standad
- PHP version: 7.4
- OS: Windows 10
- Browser: Google Chrome
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't workingChangeloggedWhether the issue/PR has been added to release notes.Whether the issue/PR has been added to release notes.EmbedsWS:CoreWork stream for Plugin coreWork stream for Plugin core