为什么 og:image 元数据没有被格式化为响应数据的属性?

问题描述 投票:0回答:0

为什么在使用

og:image
元属性时以下元标记图像路径的格式不同?

我的 Nuxt3 应用程序中

og:image
属性的变量是这样的:

const { data: post } = await useFetch(`/api/posts/${route.params.id}`, {
  key: `/post/${route.params.id}`
})

useServerSeoMeta({
  title: () => `${post.value.data?.title} - Pixstery`,
  ogTitle: () => `${post.value.data?.title} - Pixstery`,
  description: () => post.value.data?.content,
  ogDescription: () => post.value.data?.content,
  ogImage: () =>
    config.public.imagekitBaseURL +
    post.value.data?.imagePath +
    '&tr=w-1200,fo-auto,dpr-auto',
  twitterCard: 'summary_large_image'
})

imagePath
的观测数据为:
users%2F5cnu6iDlTsa5mujH2sKPsBJ8OKH2%2Fposts%2Ffrench-biplane_jZqm?alt=media&token=c2837ec7-3679-4d6c-8509-2920f9200749
但是当我在源代码中查看
og:image
元数据时,它是“损坏的”,因为它的格式如下:

<meta property="og:image" content="https://ik.imagekit.io/<REMOVED>/users-biplane_jZqm?alt=media&token=c2837ec7-3679-4d6c-8509-2920f9200749&tr=w-1200,fo-auto,dpr-auto">

注意

users-biplane...
变化......它应该是路径
users%2F5cnu6iDlTsa5mujH2sKPsBJ8OKH2%2Fposts%2Ffrench-biplane_jZqm?alt=media&token=c2837ec7-3679-4d6c-8509-2920f9200749
代替。

%2F
是否导致逃生问题或某种问题?

nuxt.js meta-tags nuxtjs3
© www.soinside.com 2019 - 2024. All rights reserved.