PHPackages                             ftm-pm/media-server - 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. ftm-pm/media-server

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

ftm-pm/media-server
===================

MediaServer is a micro application that receives an image file with filters and returns the path to this image and a collection of images with applied filters.

v0.1.1(7y ago)00MITPHPPHP ^7.1.3

Since Mar 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ftm-pm/media-server)[ Packagist](https://packagist.org/packages/ftm-pm/media-server)[ RSS](/packages/ftm-pm-media-server/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (24)Versions (4)Used By (0)

MediaServer
===========

[](#mediaserver)

The MediaServer is a micro application that receives an image file with filters(or simple file) and returns the path to this image and a collection of images with applied filters (or path for simple file).

Russian documentation [here](https://github.com/ftm-pm/media-server/blob/master/docs/ru/readme.md).

Setup
-----

[](#setup)

The MediaServer is a [symfony/skeleton](https://github.com/symfony/skeleton) application with packages for uploading and cropping images. Some bundles:

- [VichUploaderBundle](https://github.com/dustin10/VichUploaderBundle) - uploading images
- [LiipImagineBundle](https://github.com/liip/LiipImagineBundle) - creating preview images
- [LexikJWTAuthenticationBundle](https://github.com/lexik/LexikJWTAuthenticationBundle) - authorization JWT
- [All bundles](#bundles)

### Installation

[](#installation)

Run the Composer command to create a new project

```
composer create-project ftm-pm/media-server my-project
```

### Configuration

[](#configuration)

After installing, you need to set environment variables. You can see variables in the .env file.

Next step, run command to update database.

```
php bin/console d:s:u --force
```

In MediaServer, authorization was developed using JWT. You can see documentation [here](https://github.com/lexik/LexikJWTAuthenticationBundle/blob/master/Resources/doc/index.md).

For create a new user, you can use any REST client. You should send a new request to  with parameters:

```
{
  "username": "johndoe",
  "password": "test",
  "email": "johndoe@example.com"
}
```

or using curl

```
curl -X POST http://my-project/api/register -d username=johndoe -d password=test -d email=johndoe@example.com
```

After the confirmation email, get token. Send a new request to :

```
{
  "username": "johndoe",
  "password": "test"
}
```

or using curl

```
curl -X POST http://my-project/api/token -d username=johndoe -d password=test
```

The MediaServer API returns two fields:

```
{
  "token": "...",
  "refresh_token": "..."
}
```

For authorization, you must to send header for any request: Authorization: Bearer your\_token.

Use
---

[](#use)

The MediaServer API can create(load, crop...) and remove images. `curl -X POST  http://my-project/api/images  ... ` - to create `curl -X DELETE  http://my-project/api/images/id  ... ` - to delete by id

### Simple loading

[](#simple-loading)

For create a new image, you can send a new **post** request with parameter `imageFile`:

```
curl -X POST -H "Authorization: Bearer your_token" -H "Content-Type: multipart/form-data" -F "imageFile=@/path/for/your/file.jpg" http://my-project/api/images
```

The MediaServer API returns one field with the path to the source image:

```
{
  "origin": "http://my-project/uploads/images/5ab/1e4/f82/5ab1e4f821d62240251619.jpg"
}
```

### Create preview

[](#create-preview)

You can create a different preview for image using [LiipImagineBundle](https://github.com/liip/LiipImagineBundle). In the api, the `previews` parameter is an array consisting of LiipImagineBundle filter configurations.

```
{
  "previews": {
    "small": {
      "thumbnail": {
        "size": [50, 50]
      }
    },
    "large": {
      "thumbnail": {
        "size": [50, 50]
      },
      "background": {
        "size": [124, 94],
        "position": "center",
        "color": "#000000"
      }
    }
  }
}
```

For example, creating a `small` preview:

```
curl -X POST -H "Authorization: Bearer your_token" -H "Content-Type: multipart/form-data" -F "imageFile=@/path/for/your/file.jpg"  -F "previews[small][thumbnail][size][0]=100" -F "previews[small][thumbnail][size][]=50" http://my-project/api/images
```

The MediaServer API returns the path to the source image, as well as a previews collection:

```
{
  "id": 1,
  "createdAt": "2018-07-28T18:35:47+03:00",
  "updatedAt": "2018-07-28T18:35:47+03:00",
  "name": "5ab1ed5b538e9914783874.png",
  "size": 536793,
  "origin": "http://my-project/uploads/images/5ab/1ed/5b5/5ab1ed5b538e9914783874.jpg",
  "previews": {
    "small": "http://my-project/media/cache/view1/rc/qcJ6p4ur/uploads/images/5ab/1ed/5b5/5ab1ed5b538e9914783874.jpg"
  }
}
```

### Download simple file

[](#download-simple-file)

For create a new document, you can send a new **post** request with parameter `documentFile`:

```
curl -X POST -H "Authorization: Bearer your_token" -H "Content-Type: multipart/form-data" -F "documentFile=@/path/for/your/file.jpg" http://my-project/api/documents
```

The MediaServer API returns the path to the source document:

```
{
    "id": 1,
    "createdAt": "2018-07-28T18:35:47+03:00",
    "updatedAt": "2018-07-28T18:35:47+03:00",
    "name": "5b5c8d539fd93267715216.png",
    "size": 536793,
    "path": "http://media-server/uploads/documents/5b5/c8d/539/5b5c8d539fd93267715216.png"
}
```

What's inside
-------------

[](#whats-inside)

It's the symfony 4 skeleton with the following bundles:

- ext-iconv
- gesdinet/jwt-refresh-token-bundle
- gfreeau/get-jwt-bundle
- guzzlehttp/guzzle
- lexik/jwt-authentication-bundle
- liip/imagine-bundle
- nelmio/cors-bundle
- sensio/framework-extra-bundle
- symfony/console
- symfony/flex
- symfony/form
- symfony/framework-bundle,
- symfony/lts
- symfony/maker-bundle
- symfony/orm-pack
- symfony/security-bundle,
- symfony/swiftmailer-bundle
- symfony/twig-bundle
- symfony/validator
- symfony/yaml
- vich/uploader-bundle

Feedback
--------

[](#feedback)

- Create a new issue
- Ask a question on [сайте](https://ftm.pm).
- Send a message to

License [MIT](https://github.com/ftm-pm/media-server/blob/master/LICENSE.txt).

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~129 days

Total

2

Last Release

2894d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3624224?v=4)[Aleksandr Serenko](/maintainers/Fafnur)[@Fafnur](https://github.com/Fafnur)

---

Top Contributors

[![Fafnur](https://avatars.githubusercontent.com/u/3624224?v=4)](https://github.com/Fafnur "Fafnur (14 commits)")

### Embed Badge

![Health badge](/badges/ftm-pm-media-server/health.svg)

```
[![Health](https://phpackages.com/badges/ftm-pm-media-server/health.svg)](https://phpackages.com/packages/ftm-pm-media-server)
```

###  Alternatives

[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M717](/packages/sylius-sylius)[forumify/forumify-platform

122.0k12](/packages/forumify-forumify-platform)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[oro/platform

Business Application Platform (BAP)

642140.7k105](/packages/oro-platform)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

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