PHPackages                             robotkudos/rk-image-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. robotkudos/rk-image-api

ActiveLibrary[Image &amp; Media](/categories/media)

robotkudos/rk-image-api
=======================

API for processing image upload to work with rk-image-uploader React app.

1.0.1(5y ago)025MITPHP

Since Oct 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/robotkudos/rk-image-api)[ Packagist](https://packagist.org/packages/robotkudos/rk-image-api)[ RSS](/packages/robotkudos-rk-image-api/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

RKImageAPI
==========

[](#rkimageapi)

RK Image API handles the backend for [rk-image-uploader](https://github.com/robotkudos/rk-image-uploader). It receives api requests from **rk-image-uploader** and response securely.

Install
-------

[](#install)

`composer require robotkudos/rk-image-api`

Usage
-----

[](#usage)

By default, **RKImageAPI** respond to `/api/image-api` with `auth:api` middleware. It will create a table named `images`and will be ready as soon as it's been installed. All you need to do it run following command to create the images table:

`php artisan migrate`

Config
------

[](#config)

If you need extra security (by adding more middlewares) or different api endpoint as well as changing the table name, you can publish vendor config file with the following command:

`php artisan vendor:publish --provider='RobotKudos/RKImageAPI/RKImageAPIServiceProvider'`

This will copy config file into `config/rkimageapi.php`. You can change the default values there.

APIs
----

[](#apis)

#### POST /api/image-api

[](#post-apiimage-api)

Receives the following

```
- image (FormData Image)
- key (random stringto group images, e.g. by user, or listing, ...)
- name
- position (the position for sorting purpose)
- comment (optional)

```

Response sample

```
{
    err: false,
    id: 123
}

```

#### GET /api/image/api

[](#get-apiimageapi)

Receives the following:

```
- key

```

Response sample

```
[
    {
        id: 123,
        name: sample_name,
        image_url: /img/sample_name.jpg,
        image_2x_url: /img/sample_name_2x.jpg,
        thumb_url: /img/sample_name_thumb.jpg,
        thumb_2x_url: /img/sample_name_thumb_2x.jpg,
        position: 1,
        comments: ...
     }
]

```

### DELETE /api/image-api

[](#delete-apiimage-api)

It deletes all images with the key.

Receives the following:

```
- key

```

Response sample

```
{
    err: false
}

```

### PUT /api/image-api/{id}

[](#put-apiimage-apiid)

Edit the name of image.

Receives the following:

```
- action: rename // currenty only support rename
- name: the new name

```

Response sample

```
{
    err: false,
    name: new name
}

```

### PUT /api/image-api/reorder

[](#put-apiimage-apireorder)

Swap the position of two images.

Receives

```
- id1
- pos1
- id2
- pos2

```

Response sample

```
{
    err: false
}

```

### DELETE /api/image-api/{id}

[](#delete-apiimage-apiid)

Deletes the image

Receives no content

Response sample:

```
{
    err: false
}

```

Dig deeper
----------

[](#dig-deeper)

**RKImageAPI** needs to receive a **key** to group images. It creates four images for each image it receives. One normal size (by default 1500px, you can change it via config file), one double that size as Retina version, one thumb size (by default 180px, configurable via config file) and one double the thumb size for retina.

Under the hood, it uses **RKImage** package for resizing and saving the image.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Recently: every ~46 days

Total

7

Last Release

1895d ago

Major Versions

0.2.3 → 1.0.02021-02-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/67655131?v=4)[robotkudos](/maintainers/robotkudos)[@robotkudos](https://github.com/robotkudos)

---

Top Contributors

[![robotkudos](https://avatars.githubusercontent.com/u/67655131?v=4)](https://github.com/robotkudos "robotkudos (9 commits)")

### Embed Badge

![Health badge](/badges/robotkudos-rk-image-api/health.svg)

```
[![Health](https://phpackages.com/badges/robotkudos-rk-image-api/health.svg)](https://phpackages.com/packages/robotkudos-rk-image-api)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
