PHPackages                             neoncitylights/data-url - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. neoncitylights/data-url

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

neoncitylights/data-url
=======================

Allows working with data URLs as entity objects in PHP

v3.0.0(1y ago)614.4k↓30%[4 PRs](https://github.com/php-lights/data-url/pulls)MITPHPPHP &gt;= 8.2CI passing

Since Oct 30Pushed 4mo agoCompare

[ Source](https://github.com/php-lights/data-url)[ Packagist](https://packagist.org/packages/neoncitylights/data-url)[ GitHub Sponsors](https://github.com/sponsors/neoncitylights)[ RSS](/packages/neoncitylights-data-url/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (8)Used By (0)

DataUrl
=======

[](#dataurl)

[![Packagist](https://camo.githubusercontent.com/e2eb1ba69bd6ad16cc4e779990fe761525088610a960ee40fa9130ee1ac4d2e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e656f6e636974796c69676874732f646174612d75726c3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/neoncitylights/data-url)[![License](https://camo.githubusercontent.com/7d217ebb91a61cb4d98e70dee31eb08e0a5f71bc518ebd4151a73c6fb1191d00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75653f7374796c653d666c61742d737175617265)](#license)[![Docs](https://camo.githubusercontent.com/6c5e69a9fa9c57099b4a4e0cdb05efad40471f328c4c89b69b0dec5c0a659576/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6465706c6f796d656e74732f7068702d6c69676874732f646174612d75726c2f6769746875622d70616765733f6c6162656c3d646f6373267374796c653d666c61742d737175617265)](https://php-lights.github.io/data-url/)[![CI](https://camo.githubusercontent.com/a9f16ff94560a89851ee97f91f16d7ff048cc6379451ebe9632de5de108be90b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7068702d6c69676874732f7068702d646174612d75726c2f2e6769746875622f776f726b666c6f77732f7068702e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/php-lights/php-data-url/actions/workflows/php.yml)[![Code coverage](https://camo.githubusercontent.com/53fb6152af23432a5d093865b46556fd5bb8d4eb3d399e57cd101af271928c0a/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7068702d6c69676874732f646174612d75726c3f7374796c653d666c61742d737175617265)](https://app.codecov.io/gh/php-lights/data-url)

A small PHP library for dealing with data URLs, which contain a media type and an encoded base64 string.

This library fully conforms to [RFC 2397](https://datatracker.ietf.org/doc/html/rfc2397).

Install
-------

[](#install)

This requires a minimum PHP version of v8.2.

```
composer require neoncitylights/data-url

```

Usage
-----

[](#usage)

```
