Generate Avatars using Initials, Bears or Kittens

Overview

Contributors Forks Stargazers Issues MIT License


Avatary

Simple avatar generator
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

It's just a simple project to generate avatars using names. For the moment it supports only english and arabic names.

Built With

This project is made with the awesome frameworks/packages

And this awesome Readme is made possible with :

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Since Avatary is built using Laravel 8, so the prerequisites are the same as the framework

  • PHP >= 8.0
  • BCMath PHP Extension
  • Ctype PHP Extension
  • Fileinfo PHP Extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
  • GD PHP Extension

Installation

  1. Clone the repo

    git clone https://github.com/prettifystudio/avatary.git
  2. Install Composer packages

    composer install
  3. Copy the environment file & edit it accordingly

    cp .env.example .env
  4. Generate application key

    php artisan key:generate
  5. Linking Storage folder to public

    php artisan storage:link
  6. Serve the application

    php artisan serve

Usage

Using the API is simple, all you have to do is hit the Initials API. Without any parameter, the endpoint will generate an image with random background color.

But you can customize it as you need.

Name

If you want to customize the name, you can hit the endpoint with the query param name .

The default value is "John Doe"

GET https://avatary.prettify.studio/api/initials?name=Koussay Fridhi

Background Color

Background colors, are generated randomly, but you can speacify it as follows:

The Background color must be in hexadecimal form, otherwise the system will throw an exception

GET https://avatary.prettify.studio/api/initials?bgcolor=f43f43

Size

The default size of the generated image is 260px, but you can specify a custom size

GET https://avatary.prettify.studio/api/initials?size=75

This will generate a 75*75 px image. Generally you may want to use a smaller size so the request is handled quickly.

Text Color

You may want also to specify the text color, inside the image.

The default value is

#fafafa

The text color must be in hexadecimal form, otherwise the system will throw an exception

GET https://avatary.prettify.studio/api/initials?color=fafafa

Shape

The API will generate 2 shapes, a circle or a square. The default one is the circle, but you can get a square shape

GET https://avatary.prettify.studio/api/initials?shape=square

Full request

GET https://avatary.prettify.studio/api/initials?name=Koussay%20Fridhi&bgcolor=f44336&shape=circle&color=fafafa&size=250

This request will generate the following image

You can use any param you want, for example you want only the name and the size,

GET https://avatary.prettify.studio/api/initials?name=Koussay%20Fridhi&size=125

Testing

This application is using PestPHP for testing. In order to run the test suite

./vendor/bin/pest

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Your Name - @PrettifyStudio - [email protected]

Project Link: https://github.com/prettifystudio/avatary

You might also like...
Alternative image provider for fakerphp using picsum.photos

Fakerphp Picsum Images Introduction Alternative image provider for fakerphp using picsum.photos This package has been forked from mmo/faker-images for

Laravel Optical Character Reader(OCR) package using ocr engines like Tesseract
Laravel Optical Character Reader(OCR) package using ocr engines like Tesseract

LaraOCR Laravel Optical Character Reader(OCR) package using ocr engines like Tesseract under the hood. Features Read text from image using WebUI/Progr

Easily generate URLs to Minecraft avatars with the ability to switch between services

Minecraft Avatar URLs This library provides PHP utilities to generate URLs to Minecraft Avatars in different formats with the ability to easily change

Create material deisgn avatars for users just like Google Messager. It may not be unique but looks better than Identicon or Gravatar.
Create material deisgn avatars for users just like Google Messager. It may not be unique but looks better than Identicon or Gravatar.

Material-Design-Avatars Create material deisgn avatars for users just like Google Messager. It may not be unique but looks better than Identicon or Gr

PHP Library for generating SVG avatars based on React Avataaars

PHP library for Avataaars PHP Library for generating SVG avatars based on React Avataaars.

PHP library for generating random avatars based on avataaars

PHP Avataaar PHP library for generating random avatars based on avataaars. Installation Dependencies PHP 8.0 Composer 2.0 Install Install the library

Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Generate trends for your models. Easily generate charts or reports.
Generate trends for your models. Easily generate charts or reports.

Laravel Trend Generate trends for your models. Easily generate charts or reports. Support us Like our work? You can support us by purchasing one of ou

Laravel Package to generate CRUD Files using TALL Stack
Laravel Package to generate CRUD Files using TALL Stack

tall-crud-generator Laravel Package to generate CRUD Files using TALL Stack Requirements Make sure that Livewire is installed properly on your project

A library using PHP to generate QRCode from https://www.qrcode-monkey.com free

PHP Class Generate Free QRCode 👉 A library using PHP to generate QRCode from https://www.qrcode-monkey.com free ✋ NOTE: Do not generate too many QRCo

Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.

Gravity PDF Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using the pop

Generate pretty release changelogs using the commit log and Github API.

zenstruck/changelog Generate pretty release changelogs using the commit log and Github API. Changelog entries are in the following format: {short hash

Chrome extension to generate Laravel integration tests while using your app.

Laravel TestTools Check out the introduction post about the chrome extension. Installation git clone [email protected]:mpociot/laravel-testtools.git # i

Generate interactive OpenAPI documentation for your RESTful API using doctrine annotations

Generate interactive OpenAPI documentation for your RESTful API using doctrine annotations

This module adds a command to easily generate "modules" in Laravel and install them using composer.

Laravel Module Create This module adds a command to easily generate "modules" in Laravel and install them using composer Installation Simply install t

Laravel package to generate sweepstakes using the Round Robin algorithm

Laravel package to generate sweepstakes using the Round Robin algorithm. Supports any number of teams, as long as they are greater than a minimum value specified in the configuration file. Built with Laravel Collections for better handling of arrays.

Middleware to generate access logs for each request using the Apache's access log format

Middleware to generate access logs for each request using the Apache's access log format. This middleware requires a Psr log implementation, for example monolog.

PHP class to generate bookmarklets from Javascript code

Bookmarklet Gen Convert readable Javascript code into bookmarklet links Features removes comments compresses code by removing extraneous spaces, but n

Comments
  • Validate data from request before use

    Validate data from request before use

    https://github.com/prettifystudio/avatary/blob/main/app/Http/Controllers/Api/AvatarController.php#L33 Ensure that size is an integer in reasonable range and color is valid hex. Right now I can request too big image size that will overload server

    opened by Insolita 2
Owner
Prettify Studio
Made With ♥
Prettify Studio
PHP Library for generating SVG avatars based on React Avataaars

PHP library for Avataaars PHP Library for generating SVG avatars based on React Avataaars.

null 5 Apr 16, 2022
A library using PHP to generate QRCode from https://www.qrcode-monkey.com free

PHP Class Generate Free QRCode ?? A library using PHP to generate QRCode from https://www.qrcode-monkey.com free ✋ NOTE: Do not generate too many QRCo

Nguyen Truong Nguyen 53 Dec 28, 2022
A PHP GD + TwitterOAuth demo to dynamically generate Twitter header images and upload them via the API.

A PHP GD + TwitterOAuth demo to dynamically generate Twitter header images and upload them via the API. This enables you to build cool little tricks, like showing your latest followers or sponsors, latest content creted, a qrcode to something, a progress bar for some goal, and whathever you can think of.

Erika Heidi 172 Jan 5, 2023
This is a class of php QR Code, This library helps you generate QR codes in a jiffy.

This is a class of php QR Code, This library helps you generate QR codes in a jiffy.

null 59 Oct 5, 2022
An easy and elegant way to generate gravatars 🖼

pH2Gravatar The simplest Gravatar PHP package An easy and elegant way to generate gravatar profile photos from email addresses ?? ⛏ Requirements PHP 7

♚ PH⑦ de Soria™♛ 6 Jul 12, 2022
Laravel package a helper to Generate the QR code and signed it for ZATCA E-invoicing

Laravel ZATCA E-invoicing Introduction Laravel package a helper to Generate the QR code and signed it for ZATCA E-invoicing Installation To get the la

Ayman Alaiwah 8 Aug 17, 2022
Create images with embedded text using advanced typography

Image with Text This class makes it super easy to render images with multiple, independently styled text blocks. You can control each text block's ali

New Media Campaigns 144 Sep 7, 2022
Auto Image & file upload, resize and crop for Laravel eloquent model using Intervention image

Laravel ImageUp The qcod/laravel-imageup is a trait which gives you auto upload, resize and crop for image feature with tons of customization. Install

QCode.in 708 Dec 22, 2022
PHP Exif Library - library for reading and writing Exif headers in JPEG and TIFF files using PHP.

PEL: PHP Exif Library README file for PEL: PHP Exif Library. A library with support for reading and writing Exif headers in JPEG and TIFF images using

null 264 Dec 4, 2022
Symfony Bundle to assist in imagine manipulation using the imagine library

LiipImagineBundle PHPUnit PHP-CS-Fixer Coverage Downloads Release This bundle provides an image manipulation abstraction toolkit for Symfony-based pro

Liip 1.6k Dec 30, 2022