You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a codebase that we build for multiple deployment targets, with multiple conditional configs.
We are prospecting AWS Amplify for this project, so we have a branch where we've introduced Amplify.
When we build this for mobile-only targets, we disable SSR in Nuxt...but ALL images fail to load for mobile targets. When deployed with SSR enabled (web targets), images load beautifully (and quickly, thanks for that! 🚀). For web, it works without issue on all web platforms across all device types (including mobile-web clients).
As I've been diving into debugging the issue for mobile-only targets, I've discovered that even in SSR-off/mobile-only mode, the problem is with the baseURL --> capacitor://localhost/_amplify/image?url=https:%2F%2F<SOME_DISTRIBUTION_ID>.cloudfront.net%2Fpublic%2Fiuhwa81h4jd-IMG_5904.jpeg&w=320&q=80
How can I explicitly disable the auto-detected AWS Amplify provider using some kind of environment variable or config? We're at a dead stop moving forward without knowing how to prevent this auto-detection behavior for mobile-only builds.
For context, we are using a custom provider to leverage a public-facing CloudFront CDN that caches from S3. We do that in the following way:
// providers/cloudfront-provider.tsimport{joinURL}from'ufo'importtype{ProviderGetImage}from'@nuxt/image'import{createOperationsGenerator}from'#image'constoperationsGenerator=createOperationsGenerator()exportconstgetImage: ProviderGetImage=(src,{ modifiers ={}, baseURL }={},)=>{if(!baseURL){// also support runtime configbaseURL=useRuntimeConfig().public.siteUrl}constoperations=operationsGenerator(modifiers)return{url: joinURL(baseURL,src+(operations ? `?${operations}` : '')),}}
We have a codebase that we build for multiple deployment targets, with multiple conditional configs.
We are prospecting AWS Amplify for this project, so we have a branch where we've introduced Amplify.
When we build this for mobile-only targets, we disable SSR in Nuxt...but ALL images fail to load for mobile targets. When deployed with SSR enabled (web targets), images load beautifully (and quickly, thanks for that! 🚀). For web, it works without issue on all web platforms across all device types (including mobile-web clients).
As I've been diving into debugging the issue for mobile-only targets, I've discovered that even in SSR-off/mobile-only mode, the problem is with the baseURL -->
capacitor://localhost/_amplify/image?url=https:%2F%2F<SOME_DISTRIBUTION_ID>.cloudfront.net%2Fpublic%2Fiuhwa81h4jd-IMG_5904.jpeg&w=320&q=80
How can I explicitly disable the auto-detected AWS Amplify provider using some kind of environment variable or config? We're at a dead stop moving forward without knowing how to prevent this auto-detection behavior for mobile-only builds.
For context, we are using a custom provider to leverage a public-facing CloudFront CDN that caches from S3. We do that in the following way:
The text was updated successfully, but these errors were encountered: