Skip to content
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

ultra-weird bug : some images don't show up on mobile devices (works fine on desktop computer) #1004

Open
gordielachance opened this issue May 30, 2022 · 2 comments

Comments

@gordielachance
Copy link

Hello,

I'm adding raster images to my map (like in this example); that works fine on my desktop computer.

But I noticed that the images won't show up on mobile devices (tested on an Android smartphone and on my Ipad with Firefox).
I've spent hours trying to find out what was causing this.

I finally found out (by accident) that my code was OK, and that it seems that this has maybe something to do with the file itself or the server:

  • this image shows up on my desktop computer and on my Ipad:
    https://www.tribunaldesprejuges.org/wordpress/wp-content/uploads/2020/04/AND1_OPA75-300x212.png

  • this image shows up on my desktop computer but does not on my Ipad:
    https://tdpdatas.cargoculte.be/wordpress/wp-content/uploads/2020/04/AND1_OPA75-300x212.png

This is the same image file (I compared them with a diff checker).

I was thinking that there might be a cross-origin problem; but the map is hosted on the same server than the image that doesn't show up. Besides, it works fine on my desktop computer.

What could cause this ?
I would really appreciate a feedback since I'm stuck as hell...
Thanks!

@frankmarmier
Copy link

Hi @gordielachance

Making a fetch request on:
https://www.tribunaldesprejuges.org/wordpress/wp-content/uploads/2020/04/AND1_OPA75-300x212.png
works fine but making the same request on:
https://tdpdatas.cargoculte.be/wordpress/wp-content/uploads/2020/04/AND1_OPA75-300x212.png
I get a CORS error.

I have no idea what your wordpress / server configuration looks like.
It might be an issue in your .htaccess or inside your virtual host conf file.

Hope this helps, good luck !

@gordielachance
Copy link
Author

Hello, yes, that helps me understand. If I knew this, I would not have spent so many time trying to find out what was going on :)

Two questions :

  • why is this working on my local computer (local server) ?
  • why does not mapbox logs an error about that ?

Thanks

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