mlynch / nextjs-tailwind-ionic-capacitor-starter

A starting point for building an iOS, Android, and Progressive Web App with Tailwind CSS, React w/ Next.js, Ionic Framework, and Capacitor
https://dev.to/ionic/build-mobile-apps-with-tailwind-css-next-js-ionic-framework-and-capacitor-3kij
MIT License
1.72k stars 349 forks source link

Unsplash images are not showing on Android #31

Closed adelynx closed 2 years ago

adelynx commented 2 years ago

Unsplash images are not showing on Android. On the browser works fine but building and exporting the app for Android is not showing the images because is getting the URL.

D/InputMethodManager: startInputInner - Id : 0
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/framework-9b5d6ec4444c80fa.js
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/main-f8fa0ccd6fd7cd8a.js
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/pages/_app-aa083d9be419673c.js
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/pages/index-b66aa8961d88c178.js
D/Capacitor: Handling local request: http://localhost/_next/static/6U466ftwKTYJF493z9tiP/_buildManifest.js
D/Capacitor: Handling local request: http://localhost/_next/static/6U466ftwKTYJF493z9tiP/_ssgManifest.js
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/34fce5f1.bef0fa3d8439f59e.js
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/718.47e85776f93458d8.js
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/968.1d6014add1dad642.js
D/Capacitor: Handling local request: http://localhost/favicon.ico
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/990.b5c55a40fcc26f6b.js
D/Capacitor: Handling local request: http://localhost/_next/image?url=https%3A%2F%2Fimages.unsplash.com%2Fphoto-1610235554447-41505d7962f8%3Fixid%3DMXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%253D%26ixlib%3Drb-1.2.1%26auto%3Dformat%26fit%3Dcrop%26w%3D882%26q%3D80&w=828&q=75
D/Capacitor: Handling local request: http://localhost/_next/image?url=%2Fimg%2Fmax.jpg&w=828&q=75
D/Capacitor: Handling local request: http://localhost/_next/image?url=https%3A%2F%2Fimages.unsplash.com%2Fphoto-1610212594948-370947a3ba0b%3Fixid%3DMXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%253D%26ixlib%3Drb-1.2.1%26auto%3Dformat%26fit%3Dcrop%26w%3D934%26q%3D80&w=828&q=75
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/823.5d5644b559a8593e.js
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/78.46dcf55d1ff46d94.js
D/Capacitor: Handling local request: http://localhost/_next/static/chunks/544.1be07b82b4f34332.js
I/ViewRootImpl@cf65327[MainActivity]: ViewPostIme pointer 0
I/ViewRootImpl@cf65327[MainActivity]: ViewPostIme pointer 1
chiqors commented 2 years ago

me too, is there any update?

mlynch commented 2 years ago

Just fixed this by not using next/image. I'm guessing the update to Next.js 12 broke this or maybe a transitive dependency in the time since that update landed. Now next/image requires custom loaders when using export and I didn't want to deal with that right now when it's just easier to use <img> https://github.com/vercel/next.js/discussions/19065