Automatically add image thumbnail

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. :slight_smile: