Original Link:
https://realpython.com/courses/code-image-generator/

Build a Code Image Generator With Python
If you’re active on social media, then you know that images and videos are popular forms of content. As a programmer, you mainly work with text, so sharing the content that you create on a daily basis may not seem intuitive. That’s where a code image generator comes in handy!
A code image generator allows you to turn your code snippets into visually appealing images, so you can share your work without worrying about formatting issues, syntax highlighting inconsistencies, or character count limits.
**In this step-by-step video course, you’ll learn how to:**
- Set up and run a **Flask project**
- Connect and style **Jinja templates**
- Use **Playwright** to create images
- Beautify code with **Pygments**
- Leverage **sessions** to save browser states
- Enhance the user experience with **JavaScript**
**What’s Included:**
- 16 Lessons
- Video Subtitles and Full Transcripts
- 2 Downloadable Resources
- Accompanying Text-Based Tutorial
- [Q&A With Python Experts: Ask a Question](https://realpython.com/courses/code-image-generator/discussion/)
- Certificate of Completion
**Downloadable Resources:**
- [Course Slides (.pdf)](https://realpython.com/courses/code-image-generator/downloads/code-image-generator-slides/)
- [Sample Code (.zip)](https://realpython.com/courses/code-image-generator/downloads/code-image-generator-code/)
## Getting Started on a Code Image Generator
7 Lessons 28m
[- 1. Building a Code Image Generator With Python (Overview) 01:07](https://realpython.com/videos/code-image-generator-overview/)[- 2. Installing the Dependencies 04:10](https://realpython.com/videos/installing-dependencies/)[- 3. Starting the Flask App 03:28](https://realpython.com/videos/starting-flask-app/)[- 4. Taking Playwright for a Spin 04:43](https://realpython.com/videos/using-playwright/)[- 5. Taking a Screenshot 05:08](https://realpython.com/videos/take-screenshot/)[- 6. Optimizing Your Screenshots 01:27](https://realpython.com/lessons/optimize-screenshots/)[- 7. Organizing Your Screenshots 08:36](https://realpython.com/lessons/organize-screenshots/)
## Add Templates and Styling
9 Lessons 31m
[- 1. Adding a Template 03:31](https://realpython.com/lessons/add-template/)[- 2. Weaving in Template Variables 03:29](https://realpython.com/lessons/template-variables/)[- 3. Taking Screenshots With a View 05:50](https://realpython.com/lessons/screenshots-with-view/)[- 4. Adding Styling 03:37](https://realpython.com/lessons/adding-styling/)[- 5. Importing Pygments 05:23](https://realpython.com/lessons/importing-pygments/)[- 6. Adding Your Theme 01:15](https://realpython.com/lessons/adding-your-theme/)[- 7. Including the Background Color 02:24](https://realpython.com/lessons/including-background-color/)[- 8. Refactoring 03:55](https://realpython.com/lessons/refactoring/)[- 9. Building a Code Image Generator With Python (Summary) 02:23](https://realpython.com/lessons/code-image-generator-summary/)
About **Philipp Acsany**
Philipp is a core member of the Real Python team. He creates tutorials, records video courses, and hosts Office Hours sessions to support your journey to becoming a skilled and fulfilled Python developer.
[» More about Philipp](https://realpython.com/team/pacsany/)
---
*Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:*
[← Browse All Courses](https://realpython.com/search?kind=course)