Inky impression eInk built in a picture frame (automatic resizing of pictures with code example!)

I used the Inky impression eInk display to automatically show pictures I send it via email! Made with a Pi Zero W, a Pimoroni inky impression and an IKEA RIBBA picture frame (10x15cm) which fits (almost 😅) perfectly! A cron job checks for new Mail every 5 minutes, automatically resizes the attached image to fit the eInk display’s resolution and displays it. You can also select the picture from your smartphone.

See sample code on my github: GitHub - fapeg/eink_picture_frame


This is really cool. I was going to do an art gallery type thing with mine and this is something I would never have thought of.

Nice work. I built a frame and used your code as a very good starting point. I am currently working on adding email security to protect from displaying images from rogue image posters and a secure photo admin management web gui. I have cron checking email for new photos every 5 minutes. I also have a script that scans the photo_store directory, randomizes the list of photos, and presents a new photo every 10 minutes. If a new photo is detected the new photo is presented and the presentation script restarts with a new randomizes list to display.

I am running the frame from a 2700ma 2s battery. I really like how well this project is coming along

1 Like

Wow cool :) would love to see your code sometime.

How long does the Pi zero last on the batteries?

So far the frame has been up for 3 days… 75% left.
I am going to see if there are enough GPIO pins available to add a Sleepy PI or equiv
to stretch battery life out.

I’ll send an archive out to you as soon as I get a chance to clean it up. after all you started this project. If I add a sleepy pi and the pi ups board I will make a 3d printed back shell for the photoframe because I can’t fit it.

Hi Fabian,

Your code gave me a quick head start on my eink frame project. I attached a tar with everything. The file directory structure is slightly different. All credential files and and the mailid.txt file is in /home/pi/python_files/photo_store. I included my bash script that will randomly display all the files in the directory and start with another randomized list of files when done. now references a file called email_allowed.txt for user accounts that are allowed to post to the frame.

I still have work to do. Next step I plan on encrypting passwords.

I am not sure what I am going to use for a webgui. It needs to be lightweight and works well on a smartphone. I am still research it. Once done I will make a debian package that just drops everything in place.

I am still testing battery life. Maybe if I throttle down the CPU after displaying an image and throttling it back up when receiving and processing an image will help. I’d probably need to throttle up the CPU when Apache is active too.

Hopefully Pimoroni will have a larger 7 color eink screen available soon.

Link to code contributed to the 7 color eink frame project

The code has been very stable but please backup your work first!


I’ve came up with some new ideas for the Photo Frame Management GUI.
It will be able to mange the eink email account cresdentials, display saturation level, photo display time, time interval for fetching new photos by email, upload and download photos, cpu max low frequency. I want to add username and password encryption next. The photo frame email account and password will all be encrypted in a hash. When I get it to the point where encryption is added I’ll create a debian installer package. I moved the cron job to system cron in /etc/cron.d since it’s easy to deliver with the debian package.

The photo frames I used are here:

When installing don’t use the glass plate.

After I get the debian package delivery built I’ll design a back panel for the frame.
I’d like to use the rpi UPS board to power this frame. I’m still looking for one that has
an RTC and is arduino based. It might be the Witty Pi 3 or Sleepy Pi. The best solution might be a RPI UPS board with arduino, RTC, and usb connectivity … not sure yet. I started a battery test with a full charge. Will the running every 5 minutes and photos updating once per minute battery usage has been higher.
24hrs and 25% power used so far. If I throttle down the cpu to a lower frequency than what I am using right now when idle I might get more time. Also maybe check for new photos by email once every 15 minutes and present each photo for 10 minutes.

I figured what I am testing now is worse case.

I have another display coming in. Chicago Electronic Supply had them… so I am building another photo frame.


hey jerrynsr, your project is really helpfull for me, you did a great job. Have you finished your program and your research about battery life ?
Thanks !

Yes I did. It adds cost to the frame but it works well! I use the Witty Pi.
A good source for it is here:

It works well. I tried solutions without it by putting the wifi interface in sleep mode and throttling down the cpu… and waking and throttling up on a regular interval set in a configuration file, check for new emailed photos, display the next photo and throttle down again, but I didn’t really see the power savings that I wanted. I wanted to stretch the battery life to one month. The Witty Pi will get it done. It’s got an onboard rtc, it will power up the picture frame at a set interval. At the moment I have the witty pi power up the frame at 5am, after the frame checks for photos and displays a new photo, the frame will shutdown until 5am the following day.

That’s really cool, so now how long do the battery last since your upgrade ?
And would it be possible for you to share the updated version of your code ?
Oh and another question. You are still using the same 2700 ma battery ?
Thanks for the answer !

Same battery, I ran the frame for 4 weeks, battery was still at 75%. I needed the battery to power a camera when I was out at my r/c clubs airfield.
I bought a218650 batteries and holder, I just haven’t had time to switch it over.

Code is all on the witty pi. Just configure the scheduler to power up the pi and shut it down in 3 minutes. It’s easy, just use uugear installer. This winter I will update the code to use more of the witty pi features.

You want the witty pi 3 mini version. Not the full size one featured in the link

Wow it’s pretty good in my opinion. I was talking about the code for the raspberry pi ton control the screen. Have you editted it since January or it is just the same as this one here : pimironi-einkframe.tar.gz - Google Drive
You already share before.

Hello again, at the same time for your battery what kind of Converter do you use ? I guess it is not giving you a direct 5v.
Thanks by advance ! I hope you will answer past message too !

I am still powering the frames with the large usb battery that I listed. I modified the update_photofrme script to shutdown after 10 minutes. I hit the powerb button on the battery pack to update the photos. This winter I planned on designing a cheap circuit that will turn control a power reset after time had elapsed with no voltage detected. Basically it goes in line with the photoframe and battery. I decided to do this when the cost of the smartypi increased to even more than the pi zero w. Its peak r/c flying season for me right now. I won’t work on this until late November.