https://github.com/pukoren/php-inline-images
A PHP lib to handle image inlining in your (css, img src, etc.)
https://github.com/pukoren/php-inline-images
Last synced: 3 months ago
JSON representation
A PHP lib to handle image inlining in your (css, img src, etc.)
- Host: GitHub
- URL: https://github.com/pukoren/php-inline-images
- Owner: PuKoren
- License: mit
- Created: 2016-06-25T12:15:38.000Z (almost 9 years ago)
- Default Branch: develop
- Last Pushed: 2017-07-19T09:01:45.000Z (almost 8 years ago)
- Last Synced: 2025-02-10T07:36:29.829Z (4 months ago)
- Language: PHP
- Size: 249 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# inline-images
[](https://packagist.org/packages/koren/inline-images)
[](https://travis-ci.org/PuKoren/php-inline-images)
[](https://codecov.io/gh/PuKoren/php-inline-images)
[](https://codeclimate.com/github/PuKoren/php-inline-images)
[](https://packagist.org/packages/koren/inline-images)A PHP lib to handle image inlining in your (css, img src, etc.)
# Install
```bash
composer require koren/inline-images
```# Convert an image to an inline string value
```php
convert().'"/>';
//or for css
echo 'background: url('.$inliner->convert().')';```
# Convert a remote image to inline string value
```php
convert().'"/>';
//or for css
echo 'background: url('.$inliner->convert().')';```
# Inline SVGs
```php
convert().'"/>';
//or for css
echo 'background: url('.$inliner->convert().')';```