Small Library to Serve Images in PHP in a Better Way (Resize, Compress) with Caching Support

Overview

Pyrogram

Small Library to Serve Images in PHP
Features Documentation Contributing License

DPXImageServer

Small Library to Serve Images in PHP in a Better Way (Resize, Compress) with Caching Support.

                            ├─ $width ├─ $quality ├─ $cache
DPXServeImage("image.png", 512, 256, 80, true, true);
                └─ $file_path    └─ $height └─ $output_image

A library for serving images and optimizing, changing their sizes, this library uses the caching feature, and in addition, it is very fast and small in size. In addition to these features, this library also optimizes images.

Key Features

  • Low volume: This library is very small compared to other examples and is summarized in a .php file.
  • Optimal: This library is very optimal due to its small size and consumes very few resources to perform its operations.
  • Fast: It has a very high and acceptable speed for performing operations, i.e. changing the size of images, volume of operations and caching operations.
  • Cache capability: In computing, a cache is a high-speed data storage layer which stores a subset of data, typically transient in nature, so that future requests for that data are served up faster than is possible by accessing the data’s primary storage location. Caching allows you to efficiently reuse previously retrieved or computed data.
  • The ability to optimize and reduce the size of images: In addition to changing the length and width of the photos, this library has the ability to optimize them, just like smusher

Documentation

General

`DPXImageServer_Storage` : Path to save files and Keep Caches (insure that it is writable)  
  
`DPXImageServer_TTL` : Amount of time that a file cache is valid (In Seconds), Set it to 0 to disable caching (ofcourse if you lost your mind ! why would you disable cache ?)  
  
`DPXImageServer_PNGQuant` : Path of PNGQuant Binary, for PNG Compression we use libpngquant and has to be installed on the Server, Otherwise the uncompressed image would be returned  

There is only a function DPXServeImage with these parameters :

Size & path - parameters

`file_path` : path of the image file to be served (Required | String)  
  
`width` : Desired width of image (Optional | Integer)  
  
`height` : Desired height of image (Optional | Integer)    

Cache capability & Optimal - parameters

`quality` : Desired quality of image, a Number between 10-100 (Optional | Integer)
  
`output_image` : Wether the image would be outputted or just return the string of the image  
  
`cache` : Wether to cache the image or not  

if Image file you have given is not found or an Invalid format, DPXServerImage would return false also keep in mind that if you pass only one of width or height params, the other one will be calculated respectivly.

Contributing

This project is released and maintained under the GPL version 3 license, and in this sense, anyone can contribute to modify or improve or even add new features to this project, as well as create different forks of the project and develop the project in a branch. Separately, whether for free or commercially, there is no obstacle.

You can participate in this project by sending a pull request in sections such as:

Developix

You might also like...
BreadBooru is a light, quick, and easy to setup imageboard with themes, images, and video support
BreadBooru is a light, quick, and easy to setup imageboard with themes, images, and video support

BreadBooru a bad imageboard, that has nothing to do with (dan/gel)booru, and yet still has booru in the name BreadBooru is a light, quick, and easy to

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

Integrate your PHP application with your HTTP caching proxy

FOSHttpCache Introduction This library integrates your PHP applications with HTTP caching proxies such as Varnish. Use this library to send invalidati

Better error reporting for PHP, and prettier too!
Better error reporting for PHP, and prettier too!

PHP Error | Improve Error Reporting for PHP THIS IS NO LOBGER MAINTAINED, Please leave me alone. PHP errors are not good enough for development, it's

Better Version of Cvolton's GMDprivateServer

BetterCvoltonGDPS Better Version of Cvolton's GMDprivateServer Supported version of Geometry Dash: 1.0 - 2.11 (so any version of Geometry Dash works,

We go for better world
We go for better world

Nasa-Space-Apps-Challenge-2021 We go for better world Team: Dynamo Warrior Team Member Mazharul Hasan Fozilatunnesa Mestu Paul Nayeem Hossain Belal Ud

Magento 2 SEO extension will do perfectly for your better SEO.
Magento 2 SEO extension will do perfectly for your better SEO.

Magento 2 SEO extension will do perfectly for your better SEO. This is a bundle of outstanding features that are auto-active when you install it from Mageplaza without any code modifications. It is also friendly with your store if you need to insert meta keywords and meta descriptions for your product.

Magento 2 Blog Extension is a better blog extension for Magento 2 platform. These include all useful features of Wordpress CMS
Magento 2 Blog Extension is a better blog extension for Magento 2 platform. These include all useful features of Wordpress CMS

Magento 2 Blog extension FREE Magento 2 Better Blog by Mageplaza is integrated right into the Magento backend so you can manage your blog and your e-c

composer plugin for a better frontend setup

node-composer composer plugin for a better frontend setup PHP projects mostly are Web-Applications. Many Web-Applications also need a frontend part wh

Owner
Developix
Developix Inc
Developix
A FREE Wordpress Plugin to compress and convert images using cwebp, jpegoptim and optipng.

Squidge Is FREE WordpPress Plugin built for developers in mind compressing and convert images using jpegoptim, optipng, cwebp, and libavif. It's extre

Ainsley Clark 23 Dec 10, 2022
Small class to extract + compress .zip, .gz, .rar archives via browser.

The Unzipper The Unzipper extracts .zip and .rar archives or .gz/tar.gz files on webservers. It detects .zip/.rar/.tar.gz/.gz archives and let you cho

Lục Thiên Phong 10 Dec 24, 2022
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
Michael Pratt 307 Dec 23, 2022
This packages enables the ability to serve file streams in a smart way

A blade component for easy image manipulation Want to serve private hosted images without the need to code your own logic ? Want to resize your images

Dieter Coopman 205 Dec 19, 2022
Better Moderation, moderation just done better.

Better Moderation Plugin Commands /ban <player> <reason> <time> - Bans a player from the server. /blacklist <player> - Blacklists a player from the se

Colby Pham 5 Jun 15, 2023
Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)

COPS COPS stands for Calibre OPDS (and HTML) Php Server. See : COPS's home for more details. Don't forget to check the Wiki. Why ? In my opinion Calib

Sébastien Lucas 1.3k Jan 1, 2023
X1 - A very simple web based note solution that's designed to serve as my second brain.

X1 A very simple web based note solution that's designed to serve as my second brain. Starting Server To start the tool simply clone the repo and then

Joel Dare 118 Dec 28, 2022
A web app for the resolution of a mobile game in wich you have 4 images and a list of letters, then a few boxes to fill with the word connecting the four images.

4images_1mot_solutions A web app for the resolution of a mobile game in wich you have 4 images and a list of letters, then a few boxes to fill with th

FOTSO Claude 3 Jan 13, 2022
MOP is a php query handling and manipulation library providing easy and reliable way to manipulate query and get result in a fastest way

Mysql Optimizer mysql optimizer also known as MOP is a php query handling and manipulation library providing easy and reliable way to manipulate query

null 2 Nov 20, 2021