In your digital picture frame, you are likely to have photos that were taken by various people using different cameras. This typically means that your photo files will have many inconsistent aspect ratios. Some may be 4:3 (Four-Thirds cameras), others 3:2 (DSLR), and everything in between is possible with a smartphone.

The digital picture frame only has one format, typically 16:10 or 16:9. The effect of a non-format-adjusted family & friends photo collection can be pillar or letterboxing.

The online service Croppola uses sophisticated image recognition software to find the best composition and crop in a photo automatically. We talked to the Croppola team in Switzerland and will show you a Python script that automates the cropping process for your images.

Read this before you run the script below. Two things have changed since 2019, and one of them may be a reason not to do this at all.

First, Croppola now requires an API key on every request. The URL in the script has none, and posting to it today answers 404. Every example in Croppola’s current documentation ends &apiKey=YOURAPIKEY. You need to get a key from them before any of this works. I have corrected the URL in the script to show where the key goes, but I have not re-run it with a key of my own, so treat it as needing a re-test.

Second, and more important: Croppola strips EXIF data from the images it returns. I noted that below as a wish back in 2019. It matters far more now than it did then, because the frame’s best features read EXIF. picframe3 filters by date — including rolling windows like the last 30 days and on this day — and by tag and by place, and it reverse-geocodes the GPS coordinates into a place name for the caption. A photograph that has been through Croppola has none of that left. It becomes a picture with no date, no place and no tags.

And the problem this article solves is mostly not a problem any more. A frame that mats or blur-fills a photograph to the panel’s shape, as both pi3d and picframe3 do, handles a mixed-aspect-ratio library without touching the files. That is the route I would take today: leave the photographs alone, let the frame do the fitting. See the 2026 build guide.

Where Croppola still earns its keep is a batch of images you specifically want cropped — posters, artwork, screenshots, anything with no EXIF worth keeping in the first place. For those, read on.

A well maintained digital picture frame needs some love

A digital picture frame requires only little maintenance, but there is one thing that needs to be done right when you upload new images: The images need to have the right aspect ratio.

However, manually checking and cropping many hundred images or even more is not only very time-consuming and requires the right photo software but it also asks for a bit of a photographer’s eye.

As “making it really simple” is one of the critical success ingredients of a digital picture frame (and needed to get the stamp of approval from other household members), I did a fair amount of research to test-drive several online cropping tools.

Following many hours of researching and testing various online tools, I came across Croppola, a solution that I can highly recommend to anyone.

If you want your images to be intelligently cropped to the exact aspect ratio of your digital picture frame, then Croppola is the way to go.

Francis Ford C(r)oppola

Croppola is the brainchild of Radhakrishna Achanta, a former Ph.D. student in the field of Computer Vision at the EPFL University of Lausanne in Switzerland. Out of appreciation for a movie director, the product name was born.

Within the Image and Visual Representation Group (IVRG), directed by Professor Sabine Süsstrunk he developed a clever image recognition algorithm that automatically recognizes faces, colors, and other objects in videos.

In 2012 this know-how was applied to photos, and Achanta’s Ph.D. student colleague Thomas Lochmatter created a website to make the Croppola technology available to the public.

I talked with Thomas Lochmatter, an IT consultant for distributed data systems, about Croppola. Since 2012, Thomas has developed and maintained the software and servers of the Croppola project.

It’s a kind of magic

Croppola serves up over 100,000 cropped images through its website every month. The service is accessible either through uploading images on the site or through an API.

Although there are paying high-volume cropping corporate customers, Croppola remains mainly a research project with monetization only being given second thoughts. The current terms on their site read: free of charge up to 100 photos per day, 500 photos per month, or 2,400 photos per year, and above that you request an API key. A server subscription is USD/EUR 30 per year for 2,000 images a year.

Croppola is super fast, and the hit rate of getting the right crop is astonishingly high. Artistic tastes are a personal matter, so there will always be instances where a person may prefer a different crop, but for automating the cropping process for a digital picture frame, Croppola is more than ideal.

It reminded me of the face recognition feature of photo software like Adobe Lightroom or Apple Photos. But Croppola recognizes a lot more than just faces.

Thomas mentioned corporate projects where Croppola was integrated into the value chain of their clients, automating the process of cropping people photos into fixed shape objects and saving the client a lot of work.

Two things that I would wish for future developments: One is that the JPG compression quality, which is currently fixed at 95%, can be specified or set to 100%. The other one is the preservation of EXIF data. Unfortunately, they are removed after cropping, which is not great if other automation scripts depend on EXIF data. An example would be the filtering of images based on dates or locations. Thankfully, Thomas offered that he would look into these issues — as of 2026 the EXIF stripping is still there, and as I said at the top, it is the reason I would no longer put my own family photographs through this.

The Python script that will save you many hours

Croppola offers an API that lets you batch upload images that are subsequently analyzed, cropped, and resized. This means that you can run a Python script in the background, which automatically triggers the upload and cropping of new images.

The automatic folder supervision to trigger the Croppola script will be described in a later post, but the following Python script from Thomas does a great job of looking into a folder for new images, uploading them to Croppola, and saving the resized images to a new folder. All that’s left to do is to copy the newly cropped images to your final images folder.

In this example, I have specified the cropping for a 16:10, 1920 x 1200 px picture frame, but you can define the aspect ratio and the final pixel dimensions as you need it.

Paste the following code in a text editor and save it as croppola.py.

#!/usr/bin/env python3
import os, requests, time

# Prepare the folders
originalFolder = 'new-images-inbox'
croppedFolder = 'new-images-cropped'

if not os.path.exists(croppedFolder):
    os.makedirs(croppedFolder)

# This is the URL - put your own Croppola API key in it
url = 'https://croppola.com/croppola/image.jpg?aspectRatio=16:10&maximumWidth=100%&scaledWidth=1920&scaledHeight=1200&algorithm=croppola&apiKey=YOURAPIKEY'

# Process all pictures
for pictureFile in os.listdir(originalFolder):
    print(pictureFile)
    data = open(originalFolder + '/' + pictureFile, 'rb')
    res = requests.post(url, data=data, headers={'User-Agent' : 'py'})
    data.close();
    if res.status_code == 200:
        f = open(croppedFolder + '/' + pictureFile, 'wb')
        f.write(res.content)
        f.close()
        time.sleep(5)	# let other people crop
    else:
        print('Error ' + str(res.status_code) + '!')
        break

Adjust the settings to fit your digital picture frame in this section:

# This is the URL - put your own Croppola API key in it
url = 'https://croppola.com/croppola/image.jpg?aspectRatio=16:10&maximumWidth=100%&scaledWidth=1920&scaledHeight=1200&algorithm=croppola&apiKey=YOURAPIKEY'

If your aspect ratio is e.g., “16:9” and your monitor resolution is 1920 x 1080, you can easily define it in this line. Replace YOURAPIKEY with the key Croppola gives you — without it the request fails.

There are a lot of individual settings that Croppola allows. You can find further information on their homepage. But for our purpose, this is all you need.

One thing to be aware of before you start a large batch: the time.sleep(5) in the script is a courtesy to Croppola’s servers, and it means one image every five seconds. A thousand photographs is therefore about an hour and a half, and you would be over their daily free allowance long before that.

Move the Python file into the “Pictures” folder of your Raspberry Pi.

I assume that you have your SMB file sharing connection set up. If not, read how to set it up in “How to set up your Raspberry Pi for your digital picture frame“.

To test it, add a few images to the “new-images-inbox” folder.

Open up your Terminal, and connect to your Raspberry Pi.

ssh your-username@IP-of-your-RaspberryPi

Change to the Pictures directory

cd Pictures

Then enter

python3 croppola.py

Croppola should now convert your files and place the output into the “new-images-cropped” folder.

Check if the images have the right size, as you specified.

You’re done! No more tedious cropping and size conversion, Croppola will automate this process for you.

Conclusion

A big “Thank You” to the team behind Croppola and especially Thomas Lochmatter who provided the Python script and gave me some more background. You guys rock!