Skip to content

Related Posts: Issue with non-latin characters in file names + AMP #16178

Open
@laurelfulford

Description

Steps to reproduce the issue

  1. Start with a site with AMP enabled.
  2. Turn on Related Posts.
  3. Set up a post with a non-latin or accented character in the featured image's file name.
  4. View a post where you first post will appear as a related post (it might be easiest to edit an existing related post to add your image).

What I expected

The Related Posts will display as usual.

What happened instead

The featured image with the accent/non-latin character in the file name is sized oddly. AMP is adding classes like amp-wp-unknown-size, and the characters with accents (in this example) are encoded. This only seems to happen when AMP is enabled, and only in the Related Posts -- the other spots that the Featured Images are displayed appear to use the accents in the URL.

Screenshots
image

image

I did see https://wordpress.org/plugins/clean-image-filenames/ recommended in #14495, but wanted to report this, just in case! Please let me know if it should be moved to the amp-html/amp-wp repos instead.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions