-
Notifications
You must be signed in to change notification settings - Fork 2
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
On image upload, create smaller version of image for thumbnails #108
Comments
I'm currently working on this issue. Before I push the code, I'd like to know if you have any comments. @dchiller @fujinaga What I did is to create a new Django management commands script
Also, I modified the |
Sounds good to me! My only question (and maybe you have figured this out and it'll be in the code) is how we will use this when users upload images. Are you thinking we periodically run this command on newly uploaded images? Or run it asynchronously on image upload? |
Thank you for your comments. It's a good question which I haven't think much about. I think there are two cases:
|
I think this issue could use some refining in light of the discussions it sounds like you've been having. What images are being resized? If we aren't storing/updating images in our own database, where are the images that we are resizing coming from and being stored? If they are coming from Wikidata, then are we doing this on-the-fly? Does our photo re-sizer sit between a user and Wikidata, so that when they "upload to Wikidata" through our editor we resize the photo before it get's pushed to Wikidata? If we aren't serving any images, why do we need a resizer anyway? If we don't know the answers yet to some of these questions, but are pretty sure we'll want to convert images and turn them into thumbnails, then perhaps all we want at the moment is a module to convert and resize images. Of course, the command you've created could be repurposed at a later time for these other purposes too. In which case, I think just edit this issue for the time being to fit what you've done in your command. |
Here are some of my answers. Please feel free to comment.
The images displayed in the UMIL gallery view. One instrument have only one image to display in the gallery view like an "album cover". These images should be stored in the So images as "album covers" should be stored, only one original png and one thumbnail for each instrument.
Although we only display one image as the cover for each instrument in the gallery view, when clicking on "guitar", for example, users will go to the wikidata page of guitar (https://www.wikidata.org/wiki/Q6607) to view all other images of guitar. These images should not be stored by us. They should only stay in wikidata page. If a user want to add one image for guitar, UMIL will provide a model window. When the user uploads the new guitar image, UMIL will only need to call the wikidata API to pass the image to wikidata. So here we do not need to store the image. |
What are the reasons for storing any images on the UMIL server? There's been discussion in #15 and #105 (maybe other places and in-person, too, of course) about where to store images. If we are storing any images on the UMIL server, then how do we manage synchronization? If I'm uploading an image of a new instrument, what happens? |
We should store the thumbnails as close to the server as possible so that they can be displayed on the website as fast as possible. |
Ok, sounds like there are probably many issues that need to be made related to this process. @kunfang98927 I think you could update this issue to match what you did and then we can review. |
In discussion of #53, we'll want to create smaller versions of uploaded images for quick loading in a gallery view.
The text was updated successfully, but these errors were encountered: