Giter VIP home page Giter VIP logo

webimageresizer's Introduction

WebImageResizer

Simple tool to automatically resize uploaded images when demanded.

Made with the power of Intervention Image.

Requirements

  • Apache 2
  • mod_php5 or mod_php7.0
  • mod_rewrite
  • imagick

Setup

Install the dependencies using composer:

cd ./display && php composer.phar install

Other then that, there is no setup needed. Just make the main folder of this repository accessible via HTTP or HTTPS.

Using

Upload images to ./img/.

Example

Let's say, you upload an image named foo_bar.png.

You can access the original image, unscaled under ./foo_bar.png.

If you want to view a resized version, open ./[size]/foo_bar.png. Replace [size] with one of the following options:

Size category Length of the longer side
thumb 200px
small 500px
medium 700px
large 1000px

The resized images will be saved in ./img/[size]/foo_bar.png.

To regenerate an image, add the force parameter in your URL like this: ./[size]/foo_bar.png?force

Configuring

At the moment there is no real way to configure this tool. You can change the size categories in ./.htaccess, but keep in mind, that this file will be overwritten, if you update using git (which the update script does).

A more convenient way to configure this is planned.

Updating

Just run ./update.sh. Make sure to make it executable before running it for the first time.

Note: Running the update script will reset everything in the directory to the last commit in this repository#master, except for the ./img/ directory.

webimageresizer's People

Contributors

atryfox avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.