Coder Social home page Coder Social logo

How to use it with DRF? about django-webp HOT 2 OPEN

jd-solanki avatar jd-solanki commented on June 1, 2024
How to use it with DRF?

from django-webp.

Comments (2)

andrefarzat avatar andrefarzat commented on June 1, 2024

Hello @jd-0001,

DRF means Django Rest Framework, right? if yes, it would be easy to add support to it.
The WEBPImageConverter class is the one which does all the conversion logic, so we could add to a view or serializer to return the webp url instead of the regular image url.

To integrate in an existing project, just follow the installation guide and you will have the webp templatetag in your django, then we can create the view/serializer

What you think ?

from django-webp.

jd-solanki avatar jd-solanki commented on June 1, 2024

Hi @andrefarzat it's really great that we can integrate it with DRF. Currently, we are moved to another project so can we keep it open?

Can you please provide exaple of how to use WEBPImageConverter class how to return webp image URL through serializer.

Regards.

from django-webp.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.