# Random image display from Google Sheet is inconsistent

**URL:** <https://community.thunkable.com/t/random-image-display-from-google-sheet-is-inconsistent/2806465>\
**Category:** Questions about Thunkable X\
**Tags:** image, help\
**Created:** [January 27, 2024, 8:01pm UTC](https://community.thunkable.com/t/random-image-display-from-google-sheet-is-inconsistent/2806465 "2024-01-27T20:01:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tatbaartheloulou](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tatbaartheloulou](https://community.thunkable.com/u/tatbaartheloulou)\
**Post date:** [January 27, 2024, 8:01pm UTC](https://community.thunkable.com/t/random-image-display-from-google-sheet-is-inconsistent/2806465/1 "2024-01-27T20:01:11Z")

</div>

Hello,

I am trying to display a single random image at screen start. The images themselves are in my Drive, and the links are in a Google Sheet, and they work. In fact, sporadically, the code works as intended. But only sporadically. Sometimes I load the page and the image comes up and everything is beautiful, but sometimes no image at all.

Images are jpg or png.  
Some images do appear to work more frequently than others, but I can’t see what they have in common (they aren’t smaller files, they aren’t all jpg/png, etc.)

Here are my blocks – any thoughts? Thanks so much!

 ![Screen Shot 2024-01-27 at 1.59.55 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/0/60d78bb6d2488d205b8b01349c014d7f876cbf43.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 27, 2024, 9:46pm UTC](https://community.thunkable.com/t/random-image-display-from-google-sheet-is-inconsistent/2806465/2 "2024-01-27T21:46:49Z")

</div>

I recommend three changes:

1. Don’t host images in Google Drive. If you do, make sure they are publicly available links.

2. Set a label’s text to `app variable meme` so that you can see what the url is that gets retrieved each time the screen opens. Better yet, set a text input’s text to that variable so that you can then copy and paste the url into **an incognito window** in your browser to make sure that anyone who uses the app can view the image(s) from their url(s).

3. Don’t have multiple event blocks for the same event. You have two events blocks for the “new to menu img3” component being clicked. How do you know if the app value gets changed before or after the navigate block fires? You don’t!

---

<div class="post-metadata">

**Author:** ![tatbaartheloulou](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tatbaartheloulou](https://community.thunkable.com/u/tatbaartheloulou)\
**Post date:** [January 29, 2024, 1:15am UTC](https://community.thunkable.com/t/random-image-display-from-google-sheet-is-inconsistent/2806465/3 "2024-01-29T01:15:37Z")

</div>

Thanks for that tip – I have no idea why some of the links are available to anyone and others aren’t but I will tackle that problem!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 28, 2024, 1:16am UTC](https://community.thunkable.com/t/random-image-display-from-google-sheet-is-inconsistent/2806465/4 "2024-04-28T01:16:03Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
