7. Working with Images
Learning Objectives
By the end of this chapter, you will be able to:
- Build a user avatar function
- Develop an image uploading API using Flask-Uploads
- Resize images using an API
- Compress images using Pillow to enhance API performance
In this chapter, we will learn how to perform image uploads so that we can let users post a profile picture and recipe cover image to our Smilecook application.
Introduction
In the previous chapter, we completed the account opening workflow by activating the user accounts via email. In this chapter, we will develop a function so that we can upload pictures. These pictures are the user's profile picture and the recipe cover images. Aside from uploading images, we will also discuss image ...
Get Python API Development Fundamentals now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.