Hi,
Is there anyway to add a image thumbnail to a page automatically? I was thinking that the app could automatically download the image from a site if the url was entered?
If there is nothing out there that does this. I assume a image can be maually added, would any file upload be added to the database and therefore the file can be pulled from there? Or does it need to be in the staticfiles directory?
If within the directory how do i refererence a different file name within a template if using something along these lines {% static 'images/{{project_name}}.jpg %}
Thanks
First, an “image thumbnail” is just an image - but generally of a reduced size. Functionally, it’s no different from adding any other image to you page.
As for the rest of your questions, I’m not sure I’m really following you.
There’s a whole section of the docs dealing with uploading files.
See:
Hello,
there are libraries that do this for you. You typically use their version of ImageField and specify what other dimensions you want generated.
For example I am using StdImageField and when you upload files, it automatically creates size variations.
That being said, you can still do this manually, but I don’t see the need for that.
Thanks for the replies.
This looks like a good solution. 
Hi, I know this thread is from 2021, but one thing I would add for anyone finding it now.
For a couple of fixed thumbnail sizes, I would still use the StdImageField approach mentioned above and generate them when the image is uploaded. It keeps the setup simple and works well when the required dimensions are known in advance. If the application later needs many different sizes, I would consider generating them on demand instead of creating every possible variant beforehand. That usually becomes easier to manage once the number of image sizes starts growing.
Either way, I would keep the original image and treat the thumbnails as derived versions rather than separate source files.