About Fluid Images Textformatter

Removes the height attribute and adds a class to img tags. Set max-width:100% for the class in your CSS and you have fluid images.

Category 1Markup 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).
Category 2Photo/Video/Audio
Modules that perform some function related to media such as photos and audio/video.
Category 3Text Formatters
Textformatter modules that provide run-time formatting for blocks of text (typically used with Text/Textarea fields).
Release StateBeta
Close to stable, but users are advised to be cautious and test thoroughly.*
Authorsdiogo, netcarver
Module Version0.3.1
Class NameTextformatterFluidImages
Compatibility3.0
Date AddedNovember 7, 2017
Last UpdatedNovember 12, 2017
Recommended ByNew recommendations may take up to 1 day to appear.

Instructions

This module's files should be placed in /site/modules/TextformatterFluidImages/
How to install or uninstall modules

README

TextformatterFluidImages

A textformatting module for ProcessWire that strips the height attribute from any <img> tag and adds aconfigurable CSS class. By default, the class image-width-control will be used.

To complete making the image tags fluid, add the following to your stylesheet

.image-width-control {
  max-width:100%;
}

Credits

This is based upon the RemoveHeights textformatter by Diogo Oliveira.

Comments

No comments yet. Be the first to post!

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.