Skip to content

Conversation

@alissonmuller
Copy link
Owner

No description provided.

mcueto and others added 16 commits May 21, 2019 03:56
Now you can set an optional optimized_image_output_size to yout OptimizedImageField instances to automatically resize an image within a size.

``` python
image = OptimizedImageField(
    blank=True,
    null=True,
    optimized_image_output_size=(300, 300)
)
```
if optimized_image_output_size is set to `None`(or not set) the output image will keep the same size as input image(backwards compatibillity)

If optimized_image_output_size is present, the image will be resized to be within the size(without cropping any portion of image, but filling all empty space if image has the `JPEG` extension)
`optimized_image_output_size` must be 'thumbnail' or 'cover'
Now output_size and resize_method are set as None by default.
Now Post photos are stored under `uploads/posts` folder
Resize images before saving them
@alissonmuller alissonmuller marked this pull request as ready for review June 25, 2019 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants