Skip to content

Another local image issue in SSR mode! #1822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Bader-Idris opened this issue Apr 20, 2025 · 0 comments
Open

Another local image issue in SSR mode! #1822

Bader-Idris opened this issue Apr 20, 2025 · 0 comments

Comments

@Bader-Idris
Copy link

Bader-Idris commented Apr 20, 2025

Hello Nuxt Image Team,

I hope this message finds you well. I wanted to bring to your attention an ongoing issue I've encountered while using the img function with multilingual images.

I previously implemented the following code to define thumbnails for different languages:

// Define thumbnails for each language
const thumbnailEn = img('/thumbnail.webp', {
  format: 'webp',
  width: 1200,
  height: 630,
  placeholder: [50, 50, 75, 75]
})

const thumbnailEs = img('/thumbnail-es.png', {
  format: 'webp',
  width: 1200,
  height: 630,
  placeholder: [50, 50, 75, 75]
})

const thumbnailAr = img('/thumbnail-ar.png', {
  format: 'webp',
  width: 1200,
  height: 630,
  placeholder: [50, 50, 75, 75]
})

// Create a computed property to determine which thumbnail to use
const optimizedThumbnail = computed(() => {
  switch (locale.value) {
    case 'es':
      return thumbnailEs
    case 'ar':
      return thumbnailAr
    default:
      return thumbnailEn
  }
})

useSeoMeta({
  ogImage: optimizedThumbnail,
})

However, I've been experiencing issues with all locally added images. This is the third time I've reported this problem in the past two weeks, and unfortunately, it remains unresolved.

We rely on this tool for our multilingual SEO needs, so I would greatly appreciate your assistance in fixing this error.

you can check the prior ones here #1806

Thank you for your attention to this matter. I look forward to your prompt response.

Best regards,
Bader Idris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant