Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter nguyennhuttien

    (@nguyennhuttien)

    Thread Starter nguyennhuttien

    (@nguyennhuttien)

    Hi @nosilver4u ,
    How about https://domain.com/wp-json/wp/v2/posts?slug=this-is-post-slug (GET)
    which is not embeds ? It returns response:

    [
        {
            "id": 1234,
            "date": "2021-05-20T15:04:20",
            ...
            ...
            "content": {
                "rendered": "......."

    The text in “rendered” is the content of the post. My partner gets it and display on other site, and images just has jpeg/png, not webp. I expected it has webp.
    And I realize other problem: when I open the post by clicking view https://domain.com/slug-of-post, images has webp, but when I open the post by clicking preview https://domain.com/slug-of-post/?preview_id=11130&preview_nonce=08c6efb2d6&preview=true&_thumbnail_id=11045, images not webp, it is jpeg/png.

    Because I couldn’t find any document about serve webp on wordpress rest api and I have no knowledge about “create your own parser using the EIO_Alt_Webp class,” as you mentioned, so I try to describe the problem in detail in the hope that you can come up with an easier solution.

Viewing 2 replies - 1 through 2 (of 2 total)