https://github.com/tempestphp/responsive-image
Server-side responsive images with PHP
https://github.com/tempestphp/responsive-image
Last synced: about 1 month ago
JSON representation
Server-side responsive images with PHP
- Host: GitHub
- URL: https://github.com/tempestphp/responsive-image
- Owner: tempestphp
- License: mit
- Created: 2026-05-27T12:21:12.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-29T08:41:53.000Z (about 2 months ago)
- Last Synced: 2026-05-29T10:09:19.687Z (about 2 months ago)
- Language: PHP
- Size: 356 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Responsive images with PHP
Generate responsive images with PHP and render the correct HTML.
> [!IMPORTANT]
> This package is still a work in progress! Feel free to open issues.
## Quickstart
```sh
composer require tempest/responsive-image
```
```php
use Tempest\ResponsiveImage\ResponsiveImageFactory;
use Tempest\ResponsiveImage\ResponsiveImageConfig;
$config = new ResponsiveImageConfig(
srcPath: __DIR__ . '/path/to/image/sources',
publicPath: __DIR__ . '/../public',
);
$imageFactory = new ResponsiveImageFactory($config);
$image = $imageFactory->create('/parrot.jpg');
echo $image->html;
//
```
## In depth
Read the full docs here: [https://tempestphp.com/docs/packages/responsive-image](https://tempestphp.com/docs/packages/responsive-image)