{"id":34600,"date":"2024-07-01T07:00:00","date_gmt":"2024-07-01T14:00:00","guid":{"rendered":"https:\/\/cloudinary.com\/blog\/?p=34600"},"modified":"2024-07-01T12:13:24","modified_gmt":"2024-07-01T19:13:24","slug":"event-gallery-react-aws-rekognition-firebase","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase","title":{"rendered":"How to Build an Event Gallery in React With Cloudinary, AWS Rekognition, and Firebase"},"content":{"rendered":"\n<p>Image optimization paired with Firebase&#8217;s powerful database enhances user experience by accelerating loading times and reducing bandwidth costs. This synergy allows developers to deliver fast, visually engaging experiences, driving higher engagement and conversions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What We&#8217;re Building<\/h2>\n\n\n\n<p>Eventography is a centralized platform for guests to easily upload their best shots to a secure server powered by Cloudinary. Our content moderation feature, powered by Amazon Rekognition, ensures that looking through your event\u2019s memorable photos will be a safe and enjoyable experience.<\/p>\n\n\n\n<p>This tutorial requires some basic knowledge of React. I\u2019m using <a href=\"https:\/\/vitejs.dev\/guide\/\">Vite<\/a> to generate my React v18 application and NodeJS v20.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GitHub repository: <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\">Cloudinary Event Gallery<\/a><\/li>\n\n\n\n<li>Live demo: <a href=\"https:\/\/eventographyapp.com\/\">https:\/\/eventographyapp.com\/<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">1. Set Up Firebase<\/h2>\n\n\n\n<p>To begin, log in to your <a href=\"https:\/\/firebase.google.com\/\">Firebase account or create a free account<\/a>. Then, click <strong>Create a project<\/strong> to configure your Firebase project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"399\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_399,c_scale\/f_auto,q_auto\/v1719860975\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34601\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860975\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860975\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1.png?_i=AA 1475w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860975\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860975\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860975\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-1.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Give a name to your Firebase project. I named mine <strong>Eventography<\/strong>. Check the boxes and click <strong>Continue<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"933\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_933,c_scale\/f_auto,q_auto\/v1719860971\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34602\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860971\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860971\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2.png?_i=AA 1457w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860971\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860971\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860971\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-2.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Enabling Google Analytics on your project is optional. I disabled it. Then click <strong>Create project<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"1009\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_1009,c_scale\/f_auto,q_auto\/v1719860963\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34603\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860963\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860963\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3.png?_i=AA 1348w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860963\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860963\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860963\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-3.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Hosting Configuration<\/h3>\n\n\n\n<p>Inside the Firebase console, on the left-hand panel, click <strong>Hosting<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"625\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_625,c_scale\/f_auto,q_auto\/v1719860958\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34604\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860958\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860958\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4.png?_i=AA 1348w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860958\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860958\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860958\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-4.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now, inside the hosting page, click <strong>Get Started<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"319\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_319,c_scale\/f_auto,q_auto\/v1719860954\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34605\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860954\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860954\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5.png?_i=AA 1348w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860954\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860954\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860954\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-5.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Time to set Firebase CLI in your machine. Run the following command in your terminal:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs shcb-wrap-lines\">npm install -g firebase-tools<\/code><\/span><\/pre>\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"907\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6.png\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_907,c_scale\/f_auto,q_auto\/v1719860950\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34606\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860950\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860950\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6.png?_i=AA 1348w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860950\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860950\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860950\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-6.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then click <strong>Next <\/strong>to initialize your Firebase project.<\/p>\n\n\n\n<p>Initialize your Firebase project by logging into your Firebase account in your terminal. This is the same email you used to create your <a href=\"https:\/\/firebase.google.com\/\">Firebase website<\/a>.<\/p>\n\n\n\n<p>In your terminal, run:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs shcb-wrap-lines\">firebase login<\/code><\/span><\/pre>\n\n\n<p>Run the following command from your app\u2019s root directory, then click <strong>Next<\/strong>.<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs shcb-wrap-lines\">firebase init<\/code><\/span><\/pre>\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"637\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_637,c_scale\/f_auto,q_auto\/v1719860944\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34607\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860944\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860944\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7.png?_i=AA 1348w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860944\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860944\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860944\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-7.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To deploy your app to Firebase Hosting, you can use the following command. We aren\u2019t ready to deploy our app, but we will later on. Then click <strong>Continue to console<\/strong>.<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs shcb-wrap-lines\">firebase deploy<\/code><\/span><\/pre>\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"866\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_866,c_scale\/f_auto,q_auto\/v1719860939\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34608\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860939\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860939\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8.png?_i=AA 1348w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860939\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860939\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860939\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-8.png?_i=AA 1024w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Single Sign-On Configuration<\/h3>\n\n\n\n<p>On the left navigation, click <strong>All products<\/strong>, then click <strong>Authentication.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"481\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_481,c_scale\/f_auto,q_auto\/v1719860933\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34609\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860933\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860933\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9.png?_i=AA 1775w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860933\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860933\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860933\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860933\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-9.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>On the Authentication page, click <strong>Get Started. <\/strong>&nbsp;Go to <strong>Sign-in method<\/strong> and select <strong>Google<\/strong>. You can add different sign-in methods, but for this app, we\u2019ll only do<strong> Google.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"525\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_525,c_scale\/f_auto,q_auto\/v1719860928\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34610\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860928\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860928\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10.png?_i=AA 1775w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860928\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860928\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860928\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860928\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-10.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then you\u2019ll enable Google, add a support email for your project, and finish the configuration by clicking <strong>Save<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Firestore Configuration<\/h3>\n\n\n\n<p>On the left-hand panel, click <strong>All products<\/strong>, then <strong>Cloud Firestore.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"482\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_482,c_scale\/f_auto,q_auto\/v1719860921\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34611\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860921\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860921\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11.png?_i=AA 1934w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860921\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860921\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860921\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860921\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-11.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>On the Cloud Firestore page, click <strong>Create database.&nbsp;<\/strong><\/p>\n\n\n\n<p>Set the name and location of your project. I left everything as is. Then click <strong>Next<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"400\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_400,c_scale\/f_auto,q_auto\/v1719860916\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34612\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860916\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860916\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860916\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860916\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860916\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860916\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-12.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click <strong>Start in test mode<\/strong> (make sure to come back and set the production mode after 30 days and update your security settings), then <strong>Create<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"730\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_730,c_scale\/f_auto,q_auto\/v1719860909\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34613\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860909\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860909\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13.png?_i=AA 1934w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860909\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860909\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860909\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860909\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-13.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. <\/strong>Set Up Cloudinary<\/h2>\n\n\n\n<p>To begin, log in to your <a href=\"https:\/\/cloudinary.com\/\">Cloudinary account or create a free account<\/a>. If prompted with the question, \u201cWhat\u2019s your main interest?\u201d, select <strong>Coding with APIs and SDKs<\/strong> or <strong>Skip<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"400\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_400,c_scale\/f_auto,q_auto\/v1719860904\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34614\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860904\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860904\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860904\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860904\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860904\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860904\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-14.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Cloudinary Cloud<\/h3>\n\n\n\n<p>In your account, select <strong>Settings &gt; Product Environments<\/strong>. Here you\u2019ll see the cloud that you created. Let\u2019s click the three-dot menu to edit your Cloudinary Cloud Name.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"595\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_595,c_scale\/f_auto,q_auto\/v1719860900\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34615\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860900\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860900\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860900\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860900\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860900\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860900\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-15.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Edit the product environment and name your cloud, then click <strong>Save Changes<\/strong>.<\/p>\n\n\n\n<p>It\u2019s important to keep the same cloud name across different tools to be consistent.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"534\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_534,c_scale\/f_auto,q_auto\/v1719860895\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34616\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860895\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860895\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860895\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860895\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860895\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860895\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-16.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Cloudinary Presets<\/h3>\n\n\n\n<p><a href=\"https:\/\/cloudinary.com\/documentation\/upload_presets\">Cloudinary Presets<\/a> is one of my favorite Cloudinary features. <strong>Upload Presets<\/strong> allow you to centrally establish a collection of asset upload configurations rather than configuring them individually with each upload request. You can create multiple upload presets and employ distinct presets for various upload scenarios.<\/p>\n\n\n\n<p>To create your first preset, go to <strong>Settings &gt; Upload,<\/strong> then click <strong>Add Upload preset.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"595\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_595,c_scale\/f_auto,q_auto\/v1719860889\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34617\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860889\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860889\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860889\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860889\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860889\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860889\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-17.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In your preset, make sure you\u2019re using <a href=\"https:\/\/cloudinary.com\/documentation\/react_native_image_and_video_upload#unsigned_upload\">Unsigned<\/a> as the <strong>signing mode.<\/strong> Lastly, you\u2019ll turn on the option of<strong> Use filename or externally defined Public ID<\/strong> and <strong>Unique filename<\/strong>, then click <strong>Save<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"595\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_595,c_scale\/f_auto,q_auto\/v1719860882\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34618\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860882\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860882\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860882\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860882\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860882\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860882\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-18.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Cloudinary also provides the <a href=\"https:\/\/cloudinary.com\/documentation\/react_native_image_and_video_upload#signed_upload\">Signed<\/a> as the signing mode. This mode allows you to enhance security around your uploads.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Content Moderation With AWS Rekognition<\/h3>\n\n\n\n<p><a href=\"https:\/\/aws.amazon.com\/rekognition\/\">AWS Rekognition<\/a> is a machine learning technology that analyzes image and video, and while it has different features, the one we\u2019re using with Cloudinary is the content moderation integration. This integration can help us detect potentially unsafe, inappropriate, or unwanted content.<\/p>\n\n\n\n<p>On the left-hand panel, click <strong>Settings<\/strong> &gt; <strong>Upload<\/strong> &gt; Your newly created preset &gt; <strong>Edit.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"595\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_595,c_scale\/f_auto,q_auto\/v1719860877\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34619\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860877\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860877\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860877\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860877\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860877\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860877\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-19.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In your preset, click <strong>Upload Control, <\/strong>and in the <strong>Auto moderation<\/strong> section, select<strong>AWS Rekognition<\/strong>. You can adjust the confidence level, but I\u2019ll leave the default settings as 0.5. After configuring your preset, click <strong>Save<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"595\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_595,c_scale\/f_auto,q_auto\/v1719860871\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34620\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860871\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860871\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860871\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860871\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860871\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860871\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-20.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3. Build the React App<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Firebase Configuration<\/h3>\n\n\n\n<p>In this section, we\u2019ll configure the three client-side Firebase services (SSO, Hosting, Cloud Storage) in our application. In your React application within the <strong>SRC<\/strong> folder, create a folder called <strong>helpers<\/strong> and a file called <strong>firebase.js,<\/strong> and copy and paste the following code<strong>.<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/helpers\/firebase.js\">Firebase.js source file<\/a><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-comment\">\/\/ Import the functions you need from the SDKs you need<\/span>\n<span class=\"hljs-keyword\">import<\/span> { initializeApp } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"firebase\/app\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { getStorage } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"firebase\/storage\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> {getAuth} <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'firebase\/auth'<\/span>;\n<span class=\"hljs-keyword\">import<\/span> {collection, getFirestore, setDoc} <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'firebase\/firestore'<\/span>\n<span class=\"hljs-keyword\">import<\/span> { doc, getDoc } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"firebase\/firestore\"<\/span>;\n\n\n<span class=\"hljs-keyword\">const<\/span> firebaseConfig = {\n <span class=\"hljs-attr\">apiKey<\/span>: <span class=\"hljs-string\">\"XXXXXXXXXXXX\"<\/span>,\n <span class=\"hljs-attr\">authDomain<\/span>: <span class=\"hljs-string\">\"XXXXXXXXXXXX\"<\/span>,\n <span class=\"hljs-attr\">projectId<\/span>: <span class=\"hljs-string\">\"XXXXXXXXXXXX\"<\/span>,\n <span class=\"hljs-attr\">storageBucket<\/span>: <span class=\"hljs-string\">\"XXXXXXXXXXXX\"<\/span>,\n <span class=\"hljs-attr\">messagingSenderId<\/span>: <span class=\"hljs-string\">\"XXXXXXXXXXXX\"<\/span>,\n <span class=\"hljs-attr\">appId<\/span>: <span class=\"hljs-string\">\"XXXXXXXXXXXX\"<\/span>,\n <span class=\"hljs-attr\">measurementId<\/span>: <span class=\"hljs-string\">\"XXXXXXXXXXXX\"<\/span>\n};\n\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> getEventData = <span class=\"hljs-keyword\">async<\/span> (eventId) =&gt; {\n <span class=\"hljs-keyword\">const<\/span> docRef = doc(db, <span class=\"hljs-string\">\"events\"<\/span>, eventId);\n <span class=\"hljs-keyword\">const<\/span> docSnap = <span class=\"hljs-keyword\">await<\/span> getDoc(docRef);\n <span class=\"hljs-keyword\">if<\/span> (docSnap.exists()) {\n   <span class=\"hljs-keyword\">return<\/span> docSnap.data();\n } <span class=\"hljs-keyword\">else<\/span> {\n   <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">null<\/span>;\n }\n};\n\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> updateEventData = <span class=\"hljs-keyword\">async<\/span> (eventId, data) =&gt; {\n <span class=\"hljs-keyword\">try<\/span> {\n   <span class=\"hljs-keyword\">await<\/span> setDoc(doc(collection(db, <span class=\"hljs-string\">\"events\"<\/span>), eventId), data);\n } <span class=\"hljs-keyword\">catch<\/span> (e) {\n     <span class=\"hljs-built_in\">console<\/span>.error(<span class=\"hljs-string\">\"Error adding document: \"<\/span>, e);\n }\n}\n <span class=\"hljs-comment\">\/\/ Initialize Firebase<\/span>\n<span class=\"hljs-keyword\">const<\/span> app = initializeApp(firebaseConfig);\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> storage = getStorage(app);\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> db = getFirestore(app);\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> auth = getAuth(app);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>As you can see I\u2019m initializing the app and creating some functions that will be used in different parts of the application.<br><br>The <code>getEventData(eventId)<\/code> function pulls the data from a given eventID that lives inside the events located in our Firestorage DB.<\/p>\n\n\n\n<p>The <code>updateEventData(eventId, data)<\/code> function updates an event in our Firestore DB using the eventId.<\/p>\n\n\n\n<p>The last step of the Firebase configuration is to add your own Firebase configuration to the <strong>firebase.js<\/strong> file.<\/p>\n\n\n\n<p>In your Firebase Console, click <strong>Project Overview<\/strong> on the left-hand panel, and select <strong>Web<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"595\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_595,c_scale\/f_auto,q_auto\/v1719860865\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34621\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860865\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860865\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860865\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860865\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860865\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860865\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-21.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It\u2019s now time to register your web application with Firebase. Enter the name of your application (remember to be consistent with your application name), then click<strong> Register app<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"608\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_608,c_scale\/f_auto,q_auto\/v1719860860\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34622\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860860\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860860\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860860\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860860\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860860\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860860\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-22.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Make sure that your React app has the Firebase <code>npm<\/code> package we previously installed. If it doesn\u2019t have it, run <code>npm install firebase<\/code> in the root folder of the project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"608\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_608,c_scale\/f_auto,q_auto\/v1719860855\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34623\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860855\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860855\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860855\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860855\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860855\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860855\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-23.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Replace the <strong>firebaseConfig<\/strong> object in the <strong>firebase.js<\/strong> file with the <strong>firebaseConfiguration<\/strong> provided by Firebase in your console.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Authentication With Firebase<\/h3>\n\n\n\n<p>In the React application, create a file named <strong>AuthContext.jsx<\/strong> in the <strong>src<\/strong> folder. This file will contain all the business logic related to your authentication workflow.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/AuthContext.jsx\">AuthContext.jsx source file<\/a><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-comment\">\/* eslint-disable react-refresh\/only-export-components *\/<\/span>\n<span class=\"hljs-keyword\">import<\/span> { createContext, useState, useContext, useEffect } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { auth } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/helpers\/firebase\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { getEventData } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/helpers\/firebase\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { GoogleAuthProvider, signInWithPopup } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"firebase\/auth\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> PropTypes <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'prop-types'<\/span>;\n<span class=\"hljs-keyword\">const<\/span> provider = <span class=\"hljs-keyword\">new<\/span> GoogleAuthProvider();\n<span class=\"hljs-keyword\">const<\/span> AuthContext = createContext();\n\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> AuthProvider = <span class=\"hljs-function\">(<span class=\"hljs-params\">{ children }<\/span>) =&gt;<\/span> {\n <span class=\"hljs-keyword\">const<\/span> &#91;user, setUser] = useState(<span class=\"hljs-literal\">null<\/span>);\n <span class=\"hljs-keyword\">const<\/span> &#91;docSnap, setDocSnap] = useState(<span class=\"hljs-literal\">null<\/span>);\n\n\n useEffect(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n   <span class=\"hljs-keyword\">const<\/span> fetchData = <span class=\"hljs-keyword\">async<\/span> () =&gt; {\n     <span class=\"hljs-keyword\">if<\/span> (user) {\n       <span class=\"hljs-keyword\">try<\/span> {\n         <span class=\"hljs-keyword\">const<\/span> eventData = <span class=\"hljs-keyword\">await<\/span> getEventData(user.uid);\n         setDocSnap(eventData);\n       } <span class=\"hljs-keyword\">catch<\/span> (error) {\n         <span class=\"hljs-built_in\">console<\/span>.error(<span class=\"hljs-string\">\"Error fetching data:\"<\/span>, error);\n       }\n     }\n   };\n    <span class=\"hljs-keyword\">if<\/span> (!user) {\n     <span class=\"hljs-keyword\">const<\/span> unsubscribe = auth.onAuthStateChanged(<span class=\"hljs-function\">(<span class=\"hljs-params\">user<\/span>) =&gt;<\/span> {\n       setUser(user);\n     });\n     <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n       unsubscribe();\n     };\n   } <span class=\"hljs-keyword\">else<\/span> {\n     fetchData();\n   }\n }, &#91;user]);\n \n\n\n <span class=\"hljs-keyword\">const<\/span> signInWithGoogle = <span class=\"hljs-keyword\">async<\/span> () =&gt; {\n   <span class=\"hljs-keyword\">try<\/span> {\n     <span class=\"hljs-keyword\">const<\/span> result = <span class=\"hljs-keyword\">await<\/span> signInWithPopup(auth, provider);\n     <span class=\"hljs-keyword\">const<\/span> user = result.user;\n     setUser(user);\n     <span class=\"hljs-built_in\">window<\/span>.location.href = <span class=\"hljs-string\">\"\/profile\"<\/span>;\n   } <span class=\"hljs-keyword\">catch<\/span> (error) {\n     <span class=\"hljs-built_in\">console<\/span>.error(error);\n   }\n };\n  <span class=\"hljs-keyword\">const<\/span> handleLogout = <span class=\"hljs-keyword\">async<\/span> () =&gt; {\n   <span class=\"hljs-keyword\">try<\/span> {\n     <span class=\"hljs-keyword\">await<\/span> auth.signOut();\n     setUser(<span class=\"hljs-literal\">null<\/span>);\n     <span class=\"hljs-built_in\">window<\/span>.location.href = <span class=\"hljs-string\">\"\/\"<\/span>;\n   } <span class=\"hljs-keyword\">catch<\/span> (error) {\n     <span class=\"hljs-built_in\">console<\/span>.error(error);\n   }\n };\n\n\n <span class=\"hljs-keyword\">return<\/span> (\n   <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">AuthContext.Provider<\/span> <span class=\"hljs-attr\">value<\/span>=<span class=\"hljs-string\">{{<\/span> <span class=\"hljs-attr\">user<\/span>, <span class=\"hljs-attr\">docSnap<\/span>, <span class=\"hljs-attr\">signInWithGoogle<\/span>, <span class=\"hljs-attr\">handleLogout<\/span>, <span class=\"hljs-attr\">setUser<\/span> }}&gt;<\/span>\n     {children}\n   <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">AuthContext.Provider<\/span>&gt;<\/span><\/span>\n );\n};\n\n\nAuthProvider.propTypes = {\n <span class=\"hljs-attr\">children<\/span>: PropTypes.node.isRequired,\n};\n\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> useAuth = <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> useContext(AuthContext);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Cloudinary Upload Widget<\/h3>\n\n\n\n<p><a href=\"https:\/\/cloudinary.com\/documentation\/upload_widget\">Cloudinary&#8217;s Upload widget<\/a> is a complete, interactive user interface that enables your users to upload files from a variety of sources to your website or application.<\/p>\n\n\n\n<p>In your <strong>src<\/strong> folder, create a new file called <strong>CloudinaryUploadWidget.jsx. <\/strong>This file contains the necessary code to upload your images to your Cloudinary Cloud as well as the code to run the Cloudinary Upload widget in your React app.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/CloudinaryUploadWidget.jsx\">CloudinaryUploadWidget.jsx source file<\/a><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"> <span class=\"hljs-keyword\">import<\/span> { useEffect, useState, useCallback } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> PropTypes <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"prop-types\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { updateEventData } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/helpers\/firebase\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { getEventIdFromUrl } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/helpers\/urlHelpers\"<\/span>;\n\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">CloudinaryUploadWidget<\/span>(<span class=\"hljs-params\">{ uwConfig, docSnap }<\/span>) <\/span>{\n <span class=\"hljs-keyword\">const<\/span> &#91;loaded, setLoaded] = useState(<span class=\"hljs-literal\">false<\/span>);\n <span class=\"hljs-keyword\">const<\/span> &#91;images, setImages] = useState(&#91;]);\n <span class=\"hljs-keyword\">const<\/span> &#91;thumbnails, setThumbnails] = useState(&#91;]);\n <span class=\"hljs-keyword\">const<\/span> &#91;uploadProgress, setUploadProgress] = useState(<span class=\"hljs-literal\">null<\/span>);\n\n\n <span class=\"hljs-comment\">\/**\n  * Load Cloudinary Upload Widget Script\n  *\/<\/span>\n useEffect(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n   <span class=\"hljs-keyword\">if<\/span> (!loaded) {\n     <span class=\"hljs-keyword\">const<\/span> uwScript = <span class=\"hljs-built_in\">document<\/span>.getElementById(<span class=\"hljs-string\">\"uw\"<\/span>);\n     <span class=\"hljs-keyword\">if<\/span> (!uwScript) {\n       <span class=\"hljs-keyword\">const<\/span> script = <span class=\"hljs-built_in\">document<\/span>.createElement(<span class=\"hljs-string\">\"script\"<\/span>);\n       script.setAttribute(<span class=\"hljs-string\">\"async\"<\/span>, <span class=\"hljs-string\">\"\"<\/span>);\n       script.setAttribute(<span class=\"hljs-string\">\"id\"<\/span>, <span class=\"hljs-string\">\"uw\"<\/span>);\n       script.src = <span class=\"hljs-string\">\"https:\/\/upload-widget.cloudinary.com\/global\/all.js\"<\/span>;\n       script.addEventListener(<span class=\"hljs-string\">\"load\"<\/span>, () =&gt; setLoaded(<span class=\"hljs-literal\">true<\/span>));\n       <span class=\"hljs-built_in\">document<\/span>.body.appendChild(script);\n     } <span class=\"hljs-keyword\">else<\/span> {\n       setLoaded(<span class=\"hljs-literal\">true<\/span>);\n     }\n   }\n }, &#91;loaded]);\n\n\n <span class=\"hljs-comment\">\/**\n  * This useEffect will be trigger every time the docSnap, images, or thumbnails chage\n  * and will update the data in our Firestore DB\n  *\/<\/span>\n useEffect(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n   <span class=\"hljs-keyword\">const<\/span> updateEventImages = <span class=\"hljs-keyword\">async<\/span> () =&gt; {\n     <span class=\"hljs-keyword\">try<\/span> {\n       <span class=\"hljs-keyword\">const<\/span> updatedData = {\n         ...docSnap,\n         <span class=\"hljs-attr\">images<\/span>: docSnap?.images ? &#91;...docSnap.images, ...images] : &#91;...images],\n         <span class=\"hljs-attr\">thumbnails<\/span>: docSnap?.thumbnails ? &#91;...docSnap.thumbnails, ...thumbnails] : &#91;...thumbnails],\n       };\n       <span class=\"hljs-keyword\">await<\/span> updateEventData(getEventIdFromUrl(<span class=\"hljs-built_in\">window<\/span>.location.pathname), updatedData);\n     } <span class=\"hljs-keyword\">catch<\/span> (error) {\n       <span class=\"hljs-built_in\">console<\/span>.error(<span class=\"hljs-string\">\"Error updating document: \"<\/span>, error);\n     }\n   };\n\n\n   <span class=\"hljs-keyword\">if<\/span> (docSnap &amp;&amp; images.length &gt; <span class=\"hljs-number\">0<\/span> &amp;&amp; thumbnails.length &gt; <span class=\"hljs-number\">0<\/span>) {\n     updateEventImages();\n   }\n }, &#91;docSnap, images, thumbnails]);\n\n\n <span class=\"hljs-keyword\">const<\/span> initializeCloudinaryWidget = <span class=\"hljs-keyword\">async<\/span> () =&gt; {\n   setUploadProgress(<span class=\"hljs-literal\">null<\/span>);\n   <span class=\"hljs-keyword\">if<\/span> (loaded) {\n     <span class=\"hljs-keyword\">try<\/span> {\n       <span class=\"hljs-keyword\">await<\/span> <span class=\"hljs-built_in\">window<\/span>.cloudinary.openUploadWidget(uwConfig, processUploads);\n     } <span class=\"hljs-keyword\">catch<\/span> (error) {\n       setUploadProgress(<span class=\"hljs-string\">'failed'<\/span>);\n     }\n   }\n };\n\n\n <span class=\"hljs-keyword\">const<\/span> processUploads = useCallback(<span class=\"hljs-function\">(<span class=\"hljs-params\">error, result<\/span>) =&gt;<\/span> {\n   <span class=\"hljs-keyword\">if<\/span> (result?.event === <span class=\"hljs-string\">\"queues-end\"<\/span>) {\n     result.info.files.forEach(<span class=\"hljs-function\"><span class=\"hljs-params\">img<\/span> =&gt;<\/span> {\n       <span class=\"hljs-keyword\">if<\/span> (\n         img.status !== <span class=\"hljs-string\">\"success\"<\/span> ||\n         img.uploadInfo.moderation?.&#91;<span class=\"hljs-number\">0<\/span>]?.status !== <span class=\"hljs-string\">\"approved\"<\/span> ||\n         error !== <span class=\"hljs-literal\">undefined<\/span>\n       ) {\n         setUploadProgress(<span class=\"hljs-string\">'failed'<\/span>);\n       } <span class=\"hljs-keyword\">else<\/span> {\n         setImages(<span class=\"hljs-function\"><span class=\"hljs-params\">prevImages<\/span> =&gt;<\/span> &#91;\n           ...prevImages,\n           img.uploadInfo.url,\n         ]);\n         setThumbnails(<span class=\"hljs-function\"><span class=\"hljs-params\">prevThumbnails<\/span> =&gt;<\/span> &#91;\n           ...prevThumbnails,\n           img.uploadInfo.thumbnail_url,\n         ]);\n         setUploadProgress(<span class=\"hljs-string\">'successful'<\/span>);\n       }\n     });\n   }\n }, &#91;]);\n\n\n <span class=\"hljs-keyword\">return<\/span> (\n   <span class=\"xml\"><span class=\"hljs-tag\">&lt;&gt;<\/span>\n     <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"upload_widget\"<\/span> <span class=\"hljs-attr\">onClick<\/span>=<span class=\"hljs-string\">{initializeCloudinaryWidget}<\/span>&gt;<\/span>\n       Upload Images\n     <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n     {uploadProgress &amp;&amp; (\n       <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>Image Upload Status: {uploadProgress === 'successful' ? 'successful' : 'failed'}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n     )}\n   <span class=\"hljs-tag\">&lt;\/&gt;<\/span><\/span>\n );\n}\n\n\nCloudinaryUploadWidget.propTypes = {\n <span class=\"hljs-attr\">uwConfig<\/span>: PropTypes.object.isRequired,\n <span class=\"hljs-attr\">docSnap<\/span>: PropTypes.object,\n};\n\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> CloudinaryUploadWidget;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Events Page<\/h3>\n\n\n\n<p>In the <code>src<\/code> folder, create an<strong> Events.jsx<\/strong> file, and copy and paste the following code:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/Event.jsx\">Events.jsx source file<\/a><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> <span class=\"hljs-string\">\".\/Event.css\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { useEffect, useState } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> CloudinaryUploadWidget <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/CloudinaryUploadWidget\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { getEventIdFromUrl } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/helpers\/urlHelpers\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { getEventData } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/helpers\/firebase\"<\/span>;\n\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">Event<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n <span class=\"hljs-keyword\">const<\/span> uwConfig = {\n   <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-string\">\"eventography\"<\/span>,\n   <span class=\"hljs-attr\">uploadPreset<\/span>: <span class=\"hljs-string\">\"eventography\"<\/span>,\n   <span class=\"hljs-attr\">sources<\/span>: &#91;<span class=\"hljs-string\">\"local\"<\/span>],\n   <span class=\"hljs-attr\">multiple<\/span>: <span class=\"hljs-literal\">true<\/span>,\n   <span class=\"hljs-attr\">folder<\/span>: <span class=\"hljs-string\">`<span class=\"hljs-subst\">${<span class=\"hljs-built_in\">window<\/span>.location.pathname}<\/span>`<\/span>,\n   <span class=\"hljs-attr\">thumbnailTransformation<\/span>: {\n     <span class=\"hljs-attr\">width<\/span>: <span class=\"hljs-number\">500<\/span>,\n     <span class=\"hljs-attr\">height<\/span>: <span class=\"hljs-number\">500<\/span>,\n     <span class=\"hljs-attr\">crop<\/span>: <span class=\"hljs-string\">'fill'<\/span>\n   },\n };\n <span class=\"hljs-keyword\">const<\/span> &#91;docSnap, setDocSnap] = useState();\n <span class=\"hljs-keyword\">const<\/span> urlPath = <span class=\"hljs-built_in\">window<\/span>.location.pathname;\n\n\n useEffect(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span>=&gt;<\/span>{\n   <span class=\"hljs-keyword\">const<\/span> fetchData = <span class=\"hljs-keyword\">async<\/span>() =&gt; {\n     <span class=\"hljs-keyword\">const<\/span> eventData = <span class=\"hljs-keyword\">await<\/span> getEventData(getEventIdFromUrl(urlPath));\n     setDocSnap(eventData);\n   }\n  \n   fetchData();\n },&#91;urlPath])\n\n\n <span class=\"hljs-keyword\">return<\/span> (\n   <span class=\"xml\"><span class=\"hljs-tag\">&lt;&gt;<\/span>{docSnap &amp;&amp;\n   (\n     <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"event\"<\/span>&gt;<\/span>\n       <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span>&gt;<\/span>{docSnap?.eventTitle}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n       <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h3<\/span>&gt;<\/span>{docSnap?.eventHashtag}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h3<\/span>&gt;<\/span>\n       <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">CloudinaryUploadWidget<\/span> <span class=\"hljs-attr\">uwConfig<\/span>=<span class=\"hljs-string\">{uwConfig}<\/span> <span class=\"hljs-attr\">docSnap<\/span>=<span class=\"hljs-string\">{docSnap}\/<\/span>&gt;<\/span>\n       <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span> <span class=\"hljs-attr\">onClick<\/span>=<span class=\"hljs-string\">{()<\/span> =&gt;<\/span> (window.location.href = `\/galleries\/${getEventIdFromUrl(urlPath)}`)}&gt;\n         View Pictures\n       <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n       <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"footer\"<\/span>&gt;<\/span>\n         Created with \ud83d\udc9c by\n         <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"https:\/\/eventographyapp.com\/\"<\/span>&gt;<\/span> Eventography<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n       <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n   <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n   )}\n   <span class=\"hljs-tag\">&lt;\/&gt;<\/span><\/span>\n );\n}\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> Event;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In the code above, we\u2019ll list the <a href=\"https:\/\/cloudinary.com\/documentation\/upload_widget_reference\">Cloudinary Upload Widget Configuration<\/a> that we want to pass to our <code>CloudinaryUploadWidget<\/code> component, and pull the <strong>title<\/strong> and the <strong>hashtag<\/strong> of the event from Firestore.<\/p>\n\n\n\n<p>Now create an <strong>Event.css<\/strong> file. You can file the code of styles in the <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/Event.css\">public repo<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Gallery Page<\/h3>\n\n\n\n<p>In the <code>src<\/code> folder, create a<strong> Gallery.jsx<\/strong> file. In this file, we\u2019ll pull the data from Firestore, which has the URLs to our event images. In this file, I decided to take two different approaches to show you how we can render the images in our app:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Using the URL as the <code>src<\/code> of our <code>img<\/code> tag to display the thumbnails. The user will see the thumbnails that they can click to enlarge the image.<\/li>\n\n\n\n<li>Using the <a href=\"https:\/\/cloudinary.com\/documentation\/react_integration#landingpage\">Cloudinary React SDK<\/a>. In this case, we\u2019ll create a new instance of Cloudinary to generate a transformation URL and pass that object to the <strong>AdvanceImage<\/strong> component to render the image.<\/li>\n<\/ol>\n\n\n\n<p><a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/Gallery.jsx\">Gallery.jsx source file<\/a><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-keyword\">import<\/span> { useEffect, useState } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'react'<\/span>;\n<span class=\"hljs-keyword\">import<\/span> <span class=\"hljs-string\">'.\/Gallery.css'<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { getEventIdFromUrl } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'.\/helpers\/urlHelpers'<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { getEventData } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'.\/helpers\/firebase'<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { AdvancedImage } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'@cloudinary\/react'<\/span>;\n<span class=\"hljs-keyword\">import<\/span> {Cloudinary} <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"@cloudinary\/url-gen\"<\/span>;\n\n\n<span class=\"hljs-keyword\">const<\/span> Gallery = <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n <span class=\"hljs-keyword\">const<\/span> &#91;showFullImage, setShowFullImage] = useState(<span class=\"hljs-literal\">false<\/span>);\n <span class=\"hljs-keyword\">const<\/span> &#91;selectedImage, setSelectedImage] = useState(<span class=\"hljs-literal\">null<\/span>);\n <span class=\"hljs-keyword\">const<\/span> &#91;docSnap, setDocSnap] = useState(<span class=\"hljs-literal\">null<\/span>);\n <span class=\"hljs-keyword\">const<\/span> &#91;loadingStates, setLoadingStates] = useState(&#91;]);\n <span class=\"hljs-keyword\">const<\/span> cld = <span class=\"hljs-keyword\">new<\/span> Cloudinary({\n   <span class=\"hljs-attr\">cloud<\/span>: {\n     <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-keyword\">import<\/span>.meta.env.VITE_CLOUD_NAME\n   }\n });\n\n\n <span class=\"hljs-keyword\">const<\/span> eventId = getEventIdFromUrl(<span class=\"hljs-built_in\">window<\/span>.location.pathname);\n\n\n useEffect(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n   <span class=\"hljs-keyword\">const<\/span> fetchData = <span class=\"hljs-keyword\">async<\/span> () =&gt; {\n     <span class=\"hljs-keyword\">try<\/span> {\n       <span class=\"hljs-keyword\">const<\/span> docSnap = <span class=\"hljs-keyword\">await<\/span> getEventData(eventId);\n       setDocSnap(docSnap);\n       setLoadingStates(<span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">Array<\/span>(docSnap?.thumbnails?.length || <span class=\"hljs-number\">0<\/span>).fill(<span class=\"hljs-literal\">true<\/span>));\n     } <span class=\"hljs-keyword\">catch<\/span> (error) {\n       <span class=\"hljs-built_in\">console<\/span>.error(<span class=\"hljs-string\">'Error fetching data:'<\/span>, error);\n     }\n   };\n   fetchData();\n }, &#91;eventId]);\n\n\n <span class=\"hljs-keyword\">const<\/span> handleThumbnailClick = <span class=\"hljs-function\">(<span class=\"hljs-params\">imgUrl<\/span>) =&gt;<\/span> {\n   <span class=\"hljs-keyword\">const<\/span> imageName = imgUrl.substring(imgUrl.lastIndexOf(<span class=\"hljs-string\">'\/'<\/span>) + <span class=\"hljs-number\">1<\/span>);\n   <span class=\"hljs-keyword\">const<\/span> urlBuilder = <span class=\"hljs-string\">`events\/<span class=\"hljs-subst\">${eventId}<\/span>\/<span class=\"hljs-subst\">${imageName}<\/span>`<\/span>;\n   setShowFullImage(<span class=\"hljs-literal\">true<\/span>);\n   setSelectedImage(urlBuilder);\n };\n\n\n <span class=\"hljs-keyword\">const<\/span> handleCloseFullImage = <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n   setShowFullImage(<span class=\"hljs-literal\">false<\/span>);\n   setSelectedImage(<span class=\"hljs-literal\">null<\/span>);\n };\n\n\n <span class=\"hljs-keyword\">const<\/span> handleImageLoad = <span class=\"hljs-function\">(<span class=\"hljs-params\">index<\/span>) =&gt;<\/span> {\n   setLoadingStates(<span class=\"hljs-function\">(<span class=\"hljs-params\">prevStates<\/span>) =&gt;<\/span> {\n     <span class=\"hljs-keyword\">const<\/span> newStates = &#91;...prevStates];\n     newStates&#91;index] = <span class=\"hljs-literal\">false<\/span>;\n     <span class=\"hljs-keyword\">return<\/span> newStates;\n   });\n };\n\n\n <span class=\"hljs-keyword\">return<\/span> (\n   <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"gallery\"<\/span>&gt;<\/span>\n     <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"gallery-upload-btn\"<\/span> <span class=\"hljs-attr\">onClick<\/span>=<span class=\"hljs-string\">{()<\/span> =&gt;<\/span> (window.location.href = `\/events\/${eventId}`)}&gt;\n       Upload Pics\n     <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n     <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"gallery-container\"<\/span>&gt;<\/span>\n       {showFullImage &amp;&amp; selectedImage &amp;&amp; (\n         <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"full-image-container\"<\/span>&gt;<\/span>\n           <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"close-btn\"<\/span> <span class=\"hljs-attr\">onClick<\/span>=<span class=\"hljs-string\">{handleCloseFullImage}<\/span>&gt;<\/span>\n             Close\n           <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n           <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">AdvancedImage<\/span> <span class=\"hljs-attr\">cldImg<\/span>=<span class=\"hljs-string\">{cld.image(selectedImage).delivery(<\/span>'<span class=\"hljs-attr\">q_auto<\/span>')<span class=\"hljs-attr\">.format<\/span>('<span class=\"hljs-attr\">auto<\/span>')} <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"full-image\"<\/span>\/&gt;<\/span>\n         <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n       )}\n       {!showFullImage &amp;&amp; docSnap?.thumbnails?.length &gt; 0 ? (\n         docSnap?.thumbnails?.map((imgUrl, index) =&gt; (\n           <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"image-item\"<\/span> <span class=\"hljs-attr\">key<\/span>=<span class=\"hljs-string\">{index}<\/span> <span class=\"hljs-attr\">onClick<\/span>=<span class=\"hljs-string\">{()<\/span> =&gt;<\/span> handleThumbnailClick(imgUrl)}&gt;\n             <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">img<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">{imgUrl}<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\">{<\/span>`<span class=\"hljs-attr\">Image<\/span> ${<span class=\"hljs-attr\">index<\/span>}`} <span class=\"hljs-attr\">onLoad<\/span>=<span class=\"hljs-string\">{()<\/span> =&gt;<\/span> handleImageLoad(index)} \/&gt;\n             {loadingStates&#91;index] &amp;&amp; <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>Loading...<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>}\n           <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n         ))\n       ) : (\n         <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>Loading...<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n       )}\n     <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n   <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/span>\n );\n};\n\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> Gallery;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Now create a <strong>Gallery.css<\/strong> file in your src folder. You can find the code to style in the <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/Gallery.css\">public repo.<\/a><\/p>\n\n\n\n<p>Once you start uploading images to your gallery, the page will look like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img width=\"390\" height=\"844\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-24\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-24.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_390,h_844,c_scale\/f_auto,q_auto\/v1719860851\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-24\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-24.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34624\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860851\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860851\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-24\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-24.png?_i=AA 390w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860851\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-24\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-24.png?_i=AA 139w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Profile Page<\/h3>\n\n\n\n<p>In the <code>src<\/code> folder, create a<strong> Profile.jsx<\/strong> file. In this file we won\u2019t touch Cloudinary specifics. All we\u2019ll do is pull the data from Firestore containing the name of our event and the event hashtag. If the user wants to change the information, they can easily edit it and click <strong>Save<\/strong>. The <strong>Save<\/strong> button will call the <code>handleSave()<\/code> function, which updates the event\u2019s information on Firestore. In this file, we\u2019ll also add a nice touch to allow the user to copy the event link with one click and share a QR code generated by the <strong>QRCodeGenerator<\/strong> component.<\/p>\n\n\n\n<p>Now create a <strong>Profile.jsx<\/strong> file in your <code>src<\/code> folder. You can find the source code in the <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/Profile.jsx\">public repo<\/a>.<\/p>\n\n\n\n<p>Next, create a <strong>Profile.css<\/strong> file in your <code>src<\/code> folder. You can find the styles in the <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/Profile.css\">public repo<\/a>.<\/p>\n\n\n\n<p>Your profile page should look like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img width=\"390\" height=\"844\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-25\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-25.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_390,h_844,c_scale\/f_auto,q_auto\/v1719860846\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-25\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-25.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34625\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860846\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860846\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-25\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-25.png?_i=AA 390w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860846\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-25\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-25.png?_i=AA 139w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">QR Code Generator<\/h3>\n\n\n\n<p>This component generates a QR code based on a URL. It\u2019s a nice touch to add to your app, so users can share their Eventography event with a QR code.<\/p>\n\n\n\n<p>Now create a <strong>QRCodeGenerator.jsx<\/strong> file inside your <code>src<\/code> folder. You can find the code in the <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/QRCodeGenerator.jsx\">public repo<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">URL Helpers<\/h3>\n\n\n\n<p>In your <strong>src\/helper<\/strong> folder, create a new file called <strong>urlHelpers.js<\/strong>. In this file, add all the functions related to URL manipulations that can be used across your application. I created the <strong>getEventIdFromUrl()<\/strong> function, which takes the current URL of the browser or any URL you pass and grabs the last part of the URL. In this case, it grabs the <strong>eventId<\/strong>, which is the last part of the URL.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/helpers\/urlHelpers.js\">urlHelpers.js source file<\/a><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-comment\">\/**\n* Function to extract the EventId from the Apps URL\n* <span class=\"hljs-doctag\">@param <span class=\"hljs-type\">{*}<\/span> <span class=\"hljs-variable\">urlPath<\/span><\/span>\n* <span class=\"hljs-doctag\">@returns <\/span>Event Id\n*\/<\/span>\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> getEventIdFromUrl = <span class=\"hljs-function\">(<span class=\"hljs-params\">urlPath<\/span>) =&gt;<\/span> {\n   <span class=\"hljs-keyword\">return<\/span> urlPath\n   .split(<span class=\"hljs-string\">\"\/\"<\/span>)\n   .filter(<span class=\"hljs-function\">(<span class=\"hljs-params\">segment<\/span>) =&gt;<\/span> segment !== <span class=\"hljs-string\">\"\"<\/span>)&#91;<span class=\"hljs-number\">1<\/span>];\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Other Files<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>App.jsx<\/strong>. This is the component where the user lands when they first visit the app. You can find the source code <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/App.jsx\">here<\/a>.<\/li>\n\n\n\n<li><strong>App.css<\/strong>. This file has the styles of the <strong>App.jsx<\/strong> file. You can find the source code <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/App.css\">here<\/a>.<\/li>\n\n\n\n<li><strong>Navbar.jsx<\/strong>. This is the navigation component for your application. The state of the users drives this component behavior. Suppose it\u2019s logged in or not. You can find the source code <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/Navbar.jsx\">here<\/a>.<\/li>\n\n\n\n<li><strong>Navbar.css<\/strong>. This file has the styles of the <strong>Navbar.jsx<\/strong> file. You can find the source code <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/Navbar.css\">here<\/a>.<\/li>\n\n\n\n<li><strong>Main.jsx<\/strong>. This file contains the routes to our application wrapped in the AuthContext, so the entire app has access to the AuthContext. You can find the source code <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/main.jsx\">here<\/a>.<\/li>\n\n\n\n<li><strong>Index.css<\/strong>. This file has the styles of the shell of the app. You can find the source code <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/src\/index.css\">here<\/a>.<\/li>\n\n\n\n<li><strong>ENV.<\/strong> This file contains the cloud name environment variable. You can find the source code <a href=\"https:\/\/github.com\/cloudinary-devs\/Cloudinary-Event-Gallery\/blob\/main\/.env\">here<\/a>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">4. Test the App<\/h2>\n\n\n\n<p>Log in to your app, navigate to the <strong>Profile page<\/strong>, and add a title and a hashtag to your event. Next, go to the <strong>Event page<\/strong>, click <strong>Upload Images<\/strong>, and select the images you want to upload. Once the images are successfully uploaded, you can navigate to the <strong>Gallery Page<\/strong> to view them. Lastly, you can also view them within your Cloudinary Cloud.<\/p>\n\n\n\n<p>To see the assets, click <strong>Digital Assets Management<\/strong> &gt; <strong>Media Library<\/strong> &gt; <strong>Assets<\/strong><\/p>\n\n\n\n<p>Below, you can see a screenshot of my Cloudinary Cloud with all the images I\u2019ve uploaded:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"608\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_608,c_scale\/f_auto,q_auto\/v1719860837\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34626\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860837\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860837\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860837\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860837\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860837\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860837\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-26.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To see the assets by event ID, click <strong>Digital Assets Management<\/strong> &gt; <strong>Media Library<\/strong> &gt; <strong>Folders<\/strong>.<\/p>\n\n\n\n<p>In this image you can see I have multiple folders with unique names. The highlighted name is the same as your event ID. Each folder has the corresponding images to that event.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"608\" data-public-id=\"Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27.png\" decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/w_1024,h_608,c_scale\/f_auto,q_auto\/v1719860828\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27.png?_i=AA\" alt=\"\" class=\"wp-post-34600 wp-image-34627\" loading=\"lazy\" data-format=\"png\" data-transformations=\"f_auto,q_auto\" data-version=\"1719860828\" data-seo=\"1\" srcset=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860828\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27.png?_i=AA 1999w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860828\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27.png?_i=AA 300w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860828\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27.png?_i=AA 768w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860828\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27.png?_i=AA 1024w, https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1719860828\/Web_Assets\/blog\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27\/blog-How-to-Build-an-Event-Gallery-in-React-With-Cloudinary-AWS-Rekognition-and-Firebase-27.png?_i=AA 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>During the app development process, we gained insights into various features of Cloudinary, including the Cloudinary Upload Widget, image optimization, content moderation, Cloudinary cloud storage, and upload presets. With just a few lines of code, you can accomplish a multitude of tasks using Cloudinary. Explore our <a href=\"https:\/\/cloudinary.com\/\">website<\/a> to dive deeper into our products and services.<\/p>\n\n\n\n<p><strong>Live demo<\/strong>: <a href=\"https:\/\/eventographyapp.com\/\">https:\/\/eventographyapp.com\/<\/a><\/p>\n\n\n\n<p>To stay updated with the latest product features, follow <a href=\"https:\/\/twitter.com\/cloudinary\">Cloudinary<\/a> on Twitter, explore other <a href=\"https:\/\/github.com\/cloudinary-community\">sample apps<\/a>, and join our <a href=\"https:\/\/discord.gg\/AJWHaMuk\">Discord server<\/a> and<a href=\"https:\/\/community.cloudinary.com\/\"> Community forum<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Image optimization paired with Firebase&#8217;s powerful database enhances user experience by accelerating loading times and reducing bandwidth costs. This synergy allows developers to deliver fast, visually engaging experiences, driving higher engagement and conversions. What We&#8217;re Building Eventography is a centralized platform for guests to easily upload their best shots to a secure server powered by [&hellip;]<\/p>\n","protected":false},"author":87,"featured_media":34629,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[203,246],"class_list":["post-34600","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-moderation","tag-react"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Build Eventography With Cloudinary, AWS Rekognition, and Firebase<\/title>\n<meta name=\"description\" content=\"Learn how to leverage the power of image optimization and a powerful database like Firestore to build an event gallery with React.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Build an Event Gallery in React With Cloudinary, AWS Rekognition, and Firebase\" \/>\n<meta property=\"og:description\" content=\"Learn how to leverage the power of image optimization and a powerful database like Firestore to build an event gallery with React.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-01T14:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-01T19:13:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog-jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1100\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"melindapham\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase\"},\"author\":{\"name\":\"melindapham\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9\"},\"headline\":\"How to Build an Event Gallery in React With Cloudinary, AWS Rekognition, and Firebase\",\"datePublished\":\"2024-07-01T14:00:00+00:00\",\"dateModified\":\"2024-07-01T19:13:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase\"},\"wordCount\":1934,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA\",\"keywords\":[\"Moderation\",\"React\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2024\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase\",\"url\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase\",\"name\":\"Build Eventography With Cloudinary, AWS Rekognition, and Firebase\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA\",\"datePublished\":\"2024-07-01T14:00:00+00:00\",\"dateModified\":\"2024-07-01T19:13:24+00:00\",\"description\":\"Learn how to leverage the power of image optimization and a powerful database like Firestore to build an event gallery with React.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA\",\"width\":2000,\"height\":1100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Build an Event Gallery in React With Cloudinary, AWS Rekognition, and Firebase\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9\",\"name\":\"melindapham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g\",\"caption\":\"melindapham\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Build Eventography With Cloudinary, AWS Rekognition, and Firebase","description":"Learn how to leverage the power of image optimization and a powerful database like Firestore to build an event gallery with React.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase","og_locale":"en_US","og_type":"article","og_title":"How to Build an Event Gallery in React With Cloudinary, AWS Rekognition, and Firebase","og_description":"Learn how to leverage the power of image optimization and a powerful database like Firestore to build an event gallery with React.","og_url":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase","og_site_name":"Cloudinary Blog","article_published_time":"2024-07-01T14:00:00+00:00","article_modified_time":"2024-07-01T19:13:24+00:00","og_image":[{"width":2000,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog-jpg?_i=AA","type":"image\/jpeg"}],"author":"melindapham","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase"},"author":{"name":"melindapham","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9"},"headline":"How to Build an Event Gallery in React With Cloudinary, AWS Rekognition, and Firebase","datePublished":"2024-07-01T14:00:00+00:00","dateModified":"2024-07-01T19:13:24+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase"},"wordCount":1934,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA","keywords":["Moderation","React"],"inLanguage":"en-US","copyrightYear":"2024","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase","url":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase","name":"Build Eventography With Cloudinary, AWS Rekognition, and Firebase","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA","datePublished":"2024-07-01T14:00:00+00:00","dateModified":"2024-07-01T19:13:24+00:00","description":"Learn how to leverage the power of image optimization and a powerful database like Firestore to build an event gallery with React.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA","width":2000,"height":1100},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/event-gallery-react-aws-rekognition-firebase#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Build an Event Gallery in React With Cloudinary, AWS Rekognition, and Firebase"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/0d5ad601e4c3b5be89245dfb14be42d9","name":"melindapham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e6f989fa97fe94be61596259d8629c3df65aec4c7da5c0000f90d810f313d4f4?s=96&d=mm&r=g","caption":"melindapham"}}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1715972238\/event_gallery_react-blog\/event_gallery_react-blog.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/34600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=34600"}],"version-history":[{"count":5,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/34600\/revisions"}],"predecessor-version":[{"id":34635,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/34600\/revisions\/34635"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/34629"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=34600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=34600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=34600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}