rick
rick

Reputation: 4131

Is there a way to resize images in Django via imagename.230x150.jpg?

There's a nice plugin for Frog CMS that lets you just type in yourpicture.120x120.jpg or whatever, and it will automatically use the image in that dimension. If it doesn't exist, it creates it and adds it to the filesystem.

http://www.naehrstoff.ch/code/image-resize-for-frog

I was wondering if there's anything like this in Django/Python?

Upvotes: 2

Views: 171

Answers (1)

Van Gale
Van Gale

Reputation: 43912

I think this snippet is close to what you need: Dynamic thumbnail generator

You might also want to investigate sorl-thumbnail which, even though it codes the thumbnail dimensions in the template instead of the URL, is more flexible/powerful.

Upvotes: 5

Related Questions