codingjoe / django-pictures

Responsive cross-browser image library using modern codes like AVIF & WebP
BSD 2-Clause "Simplified" License
248 stars 20 forks source link

Allow posting Pictures with DRF #62

Closed 1r00t closed 1 year ago

1r00t commented 1 year ago

In the short documentation it mentions this:

We do ship with a read-only PictureField that can be used to include all available picture sizes in a DRF serializer.

So there is currently no way to create a Picture through a DRF serializer? Or how would you go about doing that?

1r00t commented 1 year ago

I think I got it. I created a new serializer which uses the pictures.models.PictureField instead of pictures.contrib.rest_framework.PictureField