Open LeCodeurSpatial opened 3 years ago
Sorry about the delay...
I have profile images for all of the current authors now (720). I think it makes sense to host the images ourselves, rather than using a third party (like wikipedia).
What size images do you think would be ideal? The actual size of the images varies. The smallest are around 200px, most are >= 600px. One possibility would be to generate two image sizes, a thumbnail (ie 200px) and a full size image when possible.
{
// Url to thumbnail
thumbnail: string
// URL of larger image
image?: string
}
Also, do you have any thoughts on a good place to manage the image library that would allow other people to view and contribute to it? For now, I put them up on Google Photos so you can check out what we have so far. The file names are the author names.
No worries!
Great Job collecting 720 images, must have been tedious. I tried collecting a few earlier last weekend and only finished with alphabet 'A'. I had a grayscale theme in mind as well, took some time getting them and editing handful.
I looked at your image collection, went through some. Having a custom library like what you have done with Google Albums is a way better idea for the project than a third party one. But, will have to convert tiff images to jpeg or another compression format as it will take high time to load.
Pinterest seems great to maintain an image library and contributing will be easier as well. I don't currently know a better site. This is what I have created so far. Pinterest Authors Board
Images below 600px would be inadequate these days, however, is workable if no other choice. It would be great if we scale an image to a particular size and ratio, maybe even a couple of filters and present as follows:
{
// Url to orignal image
image: string
// URL of larger image
image_big: string
// URL to 1:1 image
image_square: string
//URL to grayscale
image_bw: string
}
Only if, it is feasible through javascript. Maintaining each separately will be dreary.
I believe I have a way to get it done, will try it this weekend.
Quick update... I went through the photos again and replaced most of the smaller images. So all of the original images are now > 700px wide.
We can use sharp to automate image resizing/processing. I like your idea of using grayscale for all the profile images. A lot of the author images are already in black and white, so I think it feels more consistent to have them all black and white.
Here is an updated version of the image collection with all images converted to grayscale, cropped to a 1:1
aspect ratio, and resized to 700px
.
I am going to setup an image hosting server on AWS.
My plan is:
original-image-name--{width}-x-{height}.jpg
).Anyway, just wanted to post a quick update before I head to work. I am going to work more on this next weekend.
@lukePeavey at this point how can I get the image/thumbnail from the author, you said you already did that but I can't find the image/property when GET /quotes
or even GET /random
, am I missing something obvious? Thanks :)
@dippas
This feature has not been added yet. I have profile images for all of the authors. But I still need to set up some type of image hosting. Once that is ready, we will add an image
field (or something like that) to the authors.
As soon as I have a block of free time to work on it, I will try to get this done.
@lukePeavey thanks, I am using (at the moment) the wikipedia API to get the image of the author (if exists).
I'll be waiting then :)
Hi everyone, I apologize for the holdup on the author images feature. Work has been very busy lately so I haven't had a lot of time to work on this 😞
@lukePeavey can you give a roughly estimate when you'll have this done?
@dippas Hopefully within the next month.
For anyone who wants to start using the images feature right away, here an initial version. The final API for images will probably be a bit different, but this approach will continue to work in the future as well, so it's safe to use.
URLs for author profile images can be constructed in the following way. All images are JPEG format with a .jpg
extension. All authors should have a profile image. If you find any broken/missing images, you can report them here (#52).
`${BASE_URL}/${size}/${slug}.jpg`
https://images.quotable.dev/profile
The image size in pixels. All images are 1:1 aspect ratio.
Supported values: 200
| 400
| 700
The author slug
is a URL safe version of the author's name. This property can be found on the author objects returned by the author endpoints (/authors/:id
or /authors
).
{
"link": "https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam",
"bio": "Avul Pakir Jainulabdeen Abdul Kalam (15 October 1931 – 27 July 2015) was an aerospace scientist who served as the 11th President of India from 2002 to 2007.",
"_id": "Bblz8Knp6-ZB",
"name": "A. P. J. Abdul Kalam",
"quoteCount": 2,
"slug": "a-p-j-abdul-kalam"
},
This was thrown together fairly quickly, so there may be some bugs/issues. I am going to leave this issue open while we continue to work on this.
Author Image Feature
Feature Request
This update will look to add another feature in feature-rich Quote API. It would be amazing to have the author's image along with the quote and bio.