Firebase storage structure example
<p>I understand how to upload/download images. Wondering best practice how to manage this data inside firebase console?</p>

<p>We mostly going to upload pictures/videos and send it between users via private chat/group chat within our app.</p>

<p>So I started to create this:</p>

<p><a href="https://i.stack.imgur.com/iYAm8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iYAm8.png" alt="enter image description here"></a></p>

<ol>
<li><p>should i add pictures to users e.g: </p>

<pre><code> /users/&lt;userId&gt;/images/&lt;image-file&gt;  
</code></pre></li>
<li><p>how would be good to share a picture on chat-group?</p>

<pre><code> /groups/groupId/images/&lt;image-file&gt; 
</code></pre></li>
</ol>

<p>this is how our firebase structure deals with group messages</p>

<pre><code>  /groups/&lt;groupId&gt;/&lt;messageId&gt;
</code></pre>

<p>If expanding messageId u see the message,userId(who wrote the message and timestamp)</p>

<p><a href="https://i.stack.imgur.com/7QpzO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7QpzO.png" alt="enter image description here"></a></p>

<p>suggestions would be welcomed</p>

<p>Thanks.</p>