# Minimize users ability to upload unlimited photos

**URL:** https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552
**Category:** Ask for Help
**Created:** [August 9, 2024, 1:55pm UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552 "2024-08-09T13:55:43Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Jackson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jackson/32/77196_2.png) [@Jackson](https://community.glideapps.com/u/Jackson)
#### Post date: [August 9, 2024, 1:55pm UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/1 "2024-08-09T13:55:43Z")

</div>

Hello Glide Community

In my app, I’m using the ‘Image - Multiple’ option along with ‘Image #1, #2, #3 & Image Array’ to limit users to uploading only three images. I wanted to verify if, in my attempt to save storage space on my Glide account and prevent users from uploading an excessive number of photos, I inadvertently ended up tripling the number of images (duplicates) stored in the database. I’ve attached a screenshot for your reference.

I also considered using three single image components alongside an image array, but I was concerned that this approach might clutter the app with too many image components.

Additionally, if Glide is handling the image configuration after they’re uploaded, how many images can be stored per gigabyte?

 ![Screenshot 2024-08-08 at 10.40.11 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/7/37d0b6c7f62656c11253c64bc88c0f748a4e1640.jpeg)

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [August 9, 2024, 2:01pm UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/2 "2024-08-09T14:01:58Z")

</div>

> [@Jackson](#):
>
> I inadvertently ended up tripling the number of images (duplicates) stored in the database. I’ve attached a screenshot for your reference.

That’s not quite true.  
Each of the IMAGE/1,2,3 columns and the Array column are computed columns that reference the Multiple Image column. There is no duplication of the images, because those columns are computed.

> [@Jackson](#):
>
> In my app, I’m using the ‘Image - Multiple’ option along with ‘Image #1, #2, #3 & Image Array’ to limit users to uploading only three images.

How are you actually applying the limit of 3?  
I can’t see anything in your screen shot that would be doing this - unless you are using the Array column in an action to save only the first 3 images?

---

<div class="post-metadata">

### Author: ![Jackson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jackson/32/77196_2.png) [@Jackson](https://community.glideapps.com/u/Jackson)
#### Post date: [August 9, 2024, 2:25pm UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/3 "2024-08-09T14:25:01Z")

</div>

Thank you, Darren Murphy, for your response. To limit the number of images being uploaded, I used the ‘Item Click’ feature and created an action with ‘Set Column Values.’ This way, even if a user attempts to upload 5, 10, or 15 images, only the first three will be accepted. Additionally, I’ll display ‘UP TO 3 IMAGES’ next to the component. - In response, Yes, I’m using the Array column to save only the first 3 images.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [August 9, 2024, 11:57pm UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/4 "2024-08-09T23:57:02Z")

</div>

That sounds like the correct approach to me, though if I understand it right, if they upload 3+ images and you use set column to remove anything that is more than 3, it would still take a few weeks for the removed images to not be counted towards your storage.

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [August 10, 2024, 5:15am UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/5 "2024-08-10T05:15:14Z")

</div>

Your issue caught my attention to approach it through CSS. If you’re interested, please follow this thread:

> [@framed\_picture Enforced Image Picker Upload Limit](https://community.glideapps.com/t/enforced-image-picker-upload-limit/75571):
>
> Limiting the number of images uploaded at an early stage is a necessary measure to prevent exceeding the allowed storage limits in your application. As I have posted previously, this approach is easier when controlling the Submit button on your form. In the code below, you only need to modify the :nth-child(n + 4) part of the code to set the desired upload limit. Since the “Multiple Image Picker” component does not have an option to specify a class name (limitToUpload), you will need to add a …

---

<div class="post-metadata">

### Author: ![Jackson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jackson/32/77196_2.png) [@Jackson](https://community.glideapps.com/u/Jackson)
#### Post date: [August 10, 2024, 9:26pm UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/6 "2024-08-10T21:26:46Z")

</div>

Hello Himaladin,

I’ve only been using Glide for three months, so I apologize if I’m missing something. I placed the Image Picker - Multiple inside a Container to apply custom CSS. However, I’m not entirely sure what needs to go inside the CSS class to link it with the Custom CSS in the Appearance section of the settings.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [August 10, 2024, 11:58pm UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/7 "2024-08-10T23:58:50Z")

</div>

Based on his code, you name your container’s CSS class “limitToUpload”.

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [August 11, 2024, 12:49am UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/8 "2024-08-11T00:49:53Z")

</div>

Yes, that’s the name of the class ☝

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [August 11, 2024, 2:11am UTC](https://community.glideapps.com/t/minimize-users-ability-to-upload-unlimited-photos/75552/9 "2024-08-11T02:11:10Z")

</div>

I’ve posted through several different approaches to CSS. You can use the Native form or Prevent submit search key to find it.
