Skip to content
/ Heroimg Public

Heroimg is an image generator that transforms words into stunning visuals. You can use it to create images for your social media posts, blog posts, or any other purpose.

License

Notifications You must be signed in to change notification settings

WCY-dt/Heroimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heroimg

Heroimg

Heroimg is an image generator that transforms words into stunning visuals. You can use it to create images for your social media posts, blog posts, or any other purpose.

API Usage

Warning

The project is still in early development, and the results of different versions may vary significantly.

The API can be accessed via https://heroimg.glitch.me/.

Heroimg currently has only one API endpoint available, you should use the GET method to access it:

Method URL Description
GET /hero Generate an image with text on it
GET /hero-experimental Generate an image with text on it
(experimental functions enabled)

/hero Parameters

The following parameters are available for the API:

Parameter Type Description Options Default
title string Headline text
to be displayed on the image
/ NEED A TITLE
subtitle string Subtitle or copyright text
to be displayed on the image
/ /
style string Style of the image background blob
wave
blurry-gradient
blob-scene
layered-waves
layered-peaks
Randomly
choose
one
shape string Shape of the image 16:9
4:3
1:1
16:9
fontSize number Font size of the headline text / 96
subFontSize number Font size of the subtitle text / fontSize / 2
fontColor string Color of the text / #ffffff

Response

The API returns an image with the specified text on it. The image is in PNG format.

If the parameters are invalid, the API returns a 400 Bad Request response and gives detailed reasons. If the image cannot be generated, the API returns a 500 Internal Server Error response.

Example

https://heroimg.glitch.me/hero?title=Hello,%20World!&subTitle=Created%20by%20Heroimg&style=wave&shape=16:9&fontSize=96&subFontSize=32&fontColor=%23ffffff

Style Previews

blob wave blurry-gradient
blob wave blurry-gradient
blob-scene layered-waves layered-peaks
blob-scene layered-waves layered-peaks

Size Previews

16:9 4:3 1:1
16:9 4:3 1:1

Self-hosting

This is a Node.js project. To host it yourself, you only need to clone this repository and run the following commands:

npm install
npm run start

It also supports hot-reloading with nodemon:

npm run dev

You can also deploy this project to Glitch by clicking the following button:

Remix on Glitch

Acknowledgements

The project is hosted on Glitch.

About

Heroimg is an image generator that transforms words into stunning visuals. You can use it to create images for your social media posts, blog posts, or any other purpose.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •