Pixie: Image/Avatar Proxy for Steem Applications.
Repository
https://github.com/blocker-solutions/pixie
New Project: Pixie
What is the project about?
Pixie is an image/avatar proxy for Steem applications. Similar to "steemitimages.com" and "img.busy.org" but with some key differences:
Instead of responding with a redirect, Pixie responds / proxies the images directly, this is a key requirement for a mobile project currently in development, and that's one of the motives why Pixie was born.
For example, take the account someuser, which does not actually exists. Instead of an error, Pixie generates a generic avatar, like this one:
The URL: https://img.blocker.press/a/someuser responds with the following image.
Of course, in case the account exists, and there's is an avatar, the result is the actual image, but adjusted into a square, without prejudice to the aspect ration:
The always square format is also helpful to frontend developers which don't have to hack it's way on CSS to keep the aspect ratio.
On cases where the account has a dash or dot, the placeholder avatar will be generated considering the first letter of each part, for example, other-user (now with a dash between the words):
Pixie is open-source, but it's available at https://img.blocker.press behind Cloudflare CDN, taking full advantage of browser caching and low latency anywhere on the world.
Pixie servers JPEG by default. Using an special URL segment, it can serve also WEBP images.
Instead of
use
Technology Stack
This project was built with Lumen, a slim children project of the Laravel framework. Even Lumen is already really "micro", Pixie was created with the minimal structure in mind, making it easy to maintain and use by anyone interested.
The image manipulation is done by the GD extension, though the Intervention/Image library.
The generated avatars are queried only once, and then cached first on the application level (Redis cache), then Cached on the Edge CDN (Cloudflare), and finally, expiration headers for browsers are set so the network impact is minimal.
In simple terms, once one user browses a given page and the avatar get's displayed, the next requests for the same user are served by the browser cache.
A second user which browses the same avatar, on a different machine, get served from the CDN.
This minimizes drastically the impact of server load for the image manipulation.
The docker image blockerpress/pixie is available on Docker hub for those who want to use it easily, the project repository also includes a docker-compose.yml file to help you spin-up a development environment and make Pixie your own.
Roadmap
- Load test for scale purposes.
- Replace Nginx with PHP-PM to increase throughput under possible heavy-load.
- Responses with more dimensions.
Read the optional extension on the URL and respond with the correct image encoding. Implemented on v0.3.0- Include some filters to be played with though the URL (like making the avatar into a circle, or even invert it's colors).
How to contribute?
Contact on the Github repository, Discord or Commenting on the Post.
Thank you!
P.S.
As of right now, this contribution is being made outside Utopian, so the beneficiary reward will be transferred upon payout.
Leave Pixie: Image/Avatar Proxy for Steem Applications. to:
Read more #utopian-io posts
Best Posts From Diego Hernandes
We have not curated any of hernandev's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Diego Hernandes
- Testing contribution one
- testing contribution testing ok ok ok
- testing title testing again
- testing title
- Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching.
- Markdown-It Plugins: Proxy Image & Mixed HTML Fixer
- [codecasts/ambientum] Performance Improvements & Refactoring
- Pixie: Image/Avatar Proxy for Steem Applications.
- Steem-Verifier: Easy transaction signature verification.
- Invalid SBD unit for transfers
- [php-sodium] Bindings for detached AEAD functions
- [PHP Extension] Zodium: A libsodium OOP wrapper.
- LaravelAEAD: Advanced Encryption with Associated Data (XChacha20-Poly1305-IETF and others)
- PHP OAuth Client for SteemConnect - Token Refresh and Token Encoding/Decoding
- SteemContext: Save time switching Steem apps with this Chrome Extension!
- PHP Steem Apps with Steem Connect and Laravel - Part II: Steem Configuration and Service Provider
- PHP Steem Apps with Steem Connect and Laravel - Part I: Initial Setup
- PHP-ALPINE: Base Images; Mailparse and secp256k1 Support.
- PHP-ALPINE: Package conflicts and extension fixes.
- SteemConnect SDK for PHP [RC1] - 100% Unit Test Coverage