Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images #62

Open
galenriley opened this issue Feb 1, 2020 · 9 comments
Open

Images #62

galenriley opened this issue Feb 1, 2020 · 9 comments

Comments

@galenriley
Copy link
Member

No description provided.

@galenriley
Copy link
Member Author

The units for height/width in expo/RN aren't pixels. They're dimensionless, which puts an extra complication on how big we need to save or serve images.

TODO: Decide on size/quality images to serve for in-feed/fullscreen/thumbnail/avatar scenarios

@galenriley
Copy link
Member Author

Cloudinary has a couple of ways to index an entire folder
https://support.cloudinary.com/hc/en-us/articles/202521082-How-to-list-all-images-within-a-folder-
I'd like to take advantage of that in two ways:

  • Common Images (SGs tend to repost the same stuff over and over again, and supporting this behavior in software will save us some space on our Cloudinary free tier and make the admins' lives easier)
  • Player Images. We want to use the Roster/Player bio features to tell a story about our club. To pull that off, we'll need to order photos. Either we keep a sequential list in our own database and implement something to reorder them, or we just grab everything in the player's image folder and alpha sort (and give a maintainer access to Cloudinary to rename them)

@galenriley
Copy link
Member Author

TODO: Figure out how captions/photo credit work. Can we/should we store these in image metadata? in the database?

@galenriley
Copy link
Member Author

galenriley commented Feb 1, 2020

Proposed file structure (undescore/dash/camel naming conventions TBD)

  • common*1
  • channels/{channel._id}_avatar.png
  • channels/{channel._id}_header.png ({channel._id}_hero.png? {channel._id}_background.png?)
  • feed/?*3
  • foes/{foe._id)_logo.png
  • player_thumbnails/{player._id}_thumbnail.png
  • players/id/*2

*1 - store path, return index of subfolders/images
*2 - store path, return index of subfolders/images, reverse sorted

*3 - How far do we want to break down the folders for feed images?

  • feed/yyyy/mm/{feeditem._id}/{cloudinary_id}.png
    or
  • feed/yyyy/mm/dd/{feeditem._id}/{cloudinary_id}.png
    paths to images for a post are stored one-at-a-time in the feeditem.images array. Some of the entries in this array might live in the common folder

@galenriley
Copy link
Member Author

Does anyone know of a great RN image viewer control that behaves like FB?
Plus, how do we view them when not in fullscreen mode?

@galenriley
Copy link
Member Author

The post creation part of all this is going to be a nightmare

@galenriley
Copy link
Member Author

Leaving this open until @shortnd confirms folder structure is in a place where we are all happy with it

@cMoney667
Copy link
Member

@galenriley thoughts on the folder structures that has already been in uses.. they are close to what you had above but some have been slightly modified.

@galenriley
Copy link
Member Author

galenriley commented Jun 4, 2020 via email

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

No branches or pull requests

3 participants