https://github.com/redapesolutions/image_resizer
Image resizer
https://github.com/redapesolutions/image_resizer
Last synced: over 1 year ago
JSON representation
Image resizer
- Host: GitHub
- URL: https://github.com/redapesolutions/image_resizer
- Owner: redapesolutions
- Created: 2014-11-26T08:12:40.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-26T08:34:33.000Z (over 11 years ago)
- Last Synced: 2025-01-14T15:19:14.074Z (over 1 year ago)
- Language: Python
- Size: 129 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image resizer
## Installation
### Ubuntu server
```
sudo apt-get update
sudo apt-get install nginx
sudo apt-get install build-essential python-dev python-pip
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
```
### Virtual environment
```
sudo pip install virtualenv
sudo pip install virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
mkvirtualenv resizer
workon resizer
```
### Python stuff
```
pip install -r requirements.txt
```
###Directories
Create original directory and assets directory in the same folder as app.py
## Running using nginx, upstart and uwsgi
- Copy resizer.conf to /etc/init
- Copy nginx_conf to /etc/nginx/sites-available/default
- Make sure resizer.sh is executable
```
sudo service resizer start
sudo service nginx restart
```
## Usage
### Width and height
Url pattern url/to/file/<width>/<height>/filename.png
### Keep ratio
Use the same pattern as above but replace either width or height with "x"