Login   Register  
PHP Classes
elePHPant
Icontem

Image Embedder: Replace images with embedded data in HTML pages

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2012-04-17 (2 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 460 All time: 5,473 This week: 1,669Up
Version License PHP version Categories  
image-embedder 0.1MIT/X Consortium License5.0HTML, PHP 5, Graphics
Description Author  
PHP Programming Innovation award nominee
April 2012
Number 3


Prize: One downloadable copy of Komodo IDE
This class can replace images with embedded data in HTML pages.

It can parse HTML documents to locate image tags.

The class can read the images and replace the image tags with URLs that embed the image data in the files, as long the files are not larger than a size limit which is 50K by default.

The original HTML files are renamed and the altered HTML documents are saved back to new files with the same name as the original.
Picture of Karl Holz
Name: Karl Holz is available for providing paid consulting. Contact Karl Holz .
Classes: 11 packages by
Country: Canada Canada
Age: 33
All time rank: 87722 in Canada Canada
Week rank: 247 Up7 in Canada Canada Up
Innovation award
Innovation award
Nominee: 6x

  Files folder image Files  
File Role Description
Plain text file img_fixer.php Class shell script/class
Accessible without login Plain text file README.txt Lic. readme & licence
Accessible without login Plain text file site_scanner.php Appl. php cli utility to scan all xhtml/well formed html files in current directory and encode the images under 50k

Innovation Award  
PHP Programming Innovation award nominee
April 2012
Number 3


Prize: One downloadable copy of Komodo IDE
When you need to send an HTML page to somebody, it may be a complicated process if it uses images or other resources as external files. In that case all the external resources need to be bundled with the main HTML page.

This class implements an alternative solution to avoid needing to bundle external files as separate files.

It replaces all image tags with data URLs that contain the actual image data embedded in the same HTML document, so the images no longer need to be retrieved from separate files.

Manuel Lemos
 Version Control Unique User Downloads Download Rankings  
 0%Total:460All time:5,473
 This week:0This week:1,669Up