Pexels have a great stock photography catalog under a super permissive and equally uncomplicated license. In short: Free to use, even commercially. Attribution welcome but not required. Modification allowed.
Remember though that as always, you do not automatically get to use someones likeness freely just because you have licensed a photo, including putting them in a bad light or imply that they endorse a brand or product - you need a model release or a similar agreement for that. So it can be best to shy away from using photos of faces. Reselling is not allowed, nor is creating a stock catalog of your own. No “wallpaper apps” allowed either, whatever that is.
Pexel’s REST API
They have a free REST API as well, so you can even use it programmatically with some limitations. The monthly quota of 20.000 requests might not be enough for a popular app, especially not without server-side caching in your own database, but they do mention that they might wave the limit for sensible use-cases, on a case by case basis.
How to create Flutter app with programmatic use of Pexels free stock photos?
Someone posted a pexels package to pub.dev in 2019.
This was just before Dart’s move to sound null safety, which meant all packages had to be updated to be compatible with newly created Flutter apps. Someone, potentially the same group or individual, posted a few patches under a separate package pexels_null_safety in 2021, without posting the corresponding source code to GitHub. Nice of them to share what they could, but also a bit messy.
We decided to try it out, by
- Adopting the null safety changes into a Git repo of our own
- Fixing a few url escaping issues - searching for images using multiple words would not have worked with the original package for example
- Adding support for a few new features and exported some types under friendler names for ease of use.
- We also noticed the package was broken under Flutter Web and fixed that.
If you feel like using stock photos programmatically in your app, then perhaps this is a slightly better starting point. We publsihed it under yet another package name pexels_api and it exists on GitHub too.
Remember that Pexel’s API rules are a bit stricter! Soounds like attribution to both Pexels and the photographer is required when using the photos through the api.
Get your api key over here to get started.
Need private photo sharing that's not tied up in the social media circus? Photoroll is a good way to share photos with your clients.
Or privately gather media from participants of weddings and other small to medium-sized events.