About Placeholder Images
Generate placeholder images. Generates base64 data uri string.
|Category 1||Development Tools|
Modules that have more to do with assisting development of a site rather than managing its content.
|Category 2||Markup Generation|
Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin).
Should be safe for use in production environments. *
|Compatibility||2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7|
|Date Added||October 29, 2014|
|Last Updated||December 20, 2017|
This module's files should be placed in /site/modules/PlaceholderImage/
How to install or uninstall modules
Use this module in templates to generate placeholder images. It doesn't create a physical image but a base64 data uri string to use as the src of image tag. You can get the base64 code or the complete img tag for convenience.
Example chained call:
$base64 = $modules->PlaceholderImage->width(640)->height(480)->background('DDDDDD')->render();
Then insert the string as the src like:
<img src="<?php echo $base64?>">
$imgTag = $modules->PlaceholderImage->width(640)->height(480)->render(true);
Or static calls for convenience:
$base64 = PlaceholderImage::image(150,100); $base64 = PlaceholderImage::image(150, 100, 'FF0000', 'FFFFFF', 'Custom text'); $imgTag = PlaceholderImage::imagetag(150, 100, 'FF0000', 'FFFFFF', 'Custom text');
- GD PHP lib installed in your server.
No comments yet. Be the first to post!
Your e-mail is kept confidential and not included with your comment. Website is optional.
- Admin Helpers
- Core Modules
- Development Tools
- Field Types
- File Validator
- Input Fields
- Language Modules
- Language Packs
- Markup Generation
- Premium Modules
- Process Modules
- Proof of Concept
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.