If you read MetaFilter, would you rather see text-only posts linking to images like this:
or would you rather see the images referenced in messages within the post like this:
or decide while you are reading whether or not to show the image like this:
Written for the MetaFilter website, Mondo Image is Greasemonkey script or stand-alone Firefox extension (no Greasemonkey required) that allows users to automatically display inline images from existing hotlinks. The results are similar to, but potentially more extensive than, those found with the currently proscribed image tag. The image display can be customized based on the linked image file extension, image host site, MetaFilter user posting the image, and text in the body of a message containing the hotlink. Images can be size restricted and interactively displayed.
This approach offers flexible image filtering and gives protection to users from those who might misuse posted images to compromise the security of their MetaFilter session. Mondo Image continues the design philosophy of Mondo Meta encouraging users to personalize the MetaFilter experience on their side of the browser interaction. Firefox 1.5 through 3.x is required. The current Mondo Image version is 1.3, released late May 2007.
See the Examples section for a few examples of MetaFilter topics with hotlinked images. See the Support section for help. Go to the main Extensions and Scripts page for information on more extensions and scripts.
Install
the Mondo Image Greasemonkey script. (Alt-click link to download in Firefox)
OR
Download
the Mondo Image Firefox extension.
Version 1.3 is a minor update. Automatic file extensions are now case insensitive (e.g. JPG matches the same as jpg) and it increases the default maximum image size for new installation to 550 x 550 pixels from 400 x 400, slightly tweaks performance, and updates the Greasemonkey link in the comments.
UsageMondo Image's configuration box is invoked by clicking twice within 20 pixels of the left or right border of a MetaFilter page within three seconds time. Advanced users can configure any of these parameters, see the Advanced Users section.
The Reset button returns all entries to their default status. Other buttons act as reasonably expected. All settings are saved from one session to the next. Remember to save your settings before exiting the configuration box or they will not be preserved. Reload your current page to update it with new settings.
Simple ConfigurationThe first input field in the Mondo Image configuration box lists what extensions in a hotlinked image are allowed to be automatically expanded on the page you are viewing. The list may be separated by either commas or semicolons. A leading period is optional when inputting a new extension. Default settings are the four most common image extensions, .png, .jpg, .gif, .jpeg. This list may not be inhibited, that is, you can ever only automatically show images with the listed extensions.
The second input field has the sites which are allowed to serve up an inline image. Commas and semicolons separate entries. The default setting is three popular image hosting sites. As a special case, the wildcard * optionally followed by a period is allowed at the beginning of a site name to support sites which have multiple subdomains: e.g. moo.cow.flickr.com and oink.pig.flickr.com are both covered by *.flickr.com. Even if you do not input a period after the *, it will be processed as if you had, e.g. *gle.com will only match the gle.com domain, not google.com. No other use of the wildcard character is supported and may cause the script to fail.
Only domains with alphanumeric characters and periods should be in the input field, optionally with the leading * wildcard. No other use of the wildcard character, punctuation, or other special characters is supported and their use may cause the script to fail or misinterpret the desired domain name. If the script does fail, no images will be displayed. If you need want use domain names beyond the alphanumeric support, please contact support for further help.
The site list can be overridden by unchecking the checkbox next to it. If this is done, all sites are allowed to host an image. If you are concerned about nasty host site image links being posted to MetaFilter, you may be wary of inhibiting the site list.
The third input field contains a list of users who are allowed to post inline images. Only exact matches on the user name will work, e.g. mdevore does not match MDevore. Separate the list entries by commas or semicolons. Check the corresponding checkbox to turn on this filter. By default, all users are allowed to post inline images, i.e. the list is inhibited.
The fourth input field contains a list of text, or trigger phrases, which must be present in a message body before an image is displayed. Any one of the phrases will match, they need not all be present. Leading and trailing spaces on each entry are stripped, the text must match to the word boundary, and the list is not case-sensitive. For example, a link embed entry will not match a message with the text link embedded, but LinK Embed will match. Other than the comma and semicolon delimiters, there are no special character treatments including quotes and escaped characters except as recognized by regular expressions. If you do not understand regular expression processing, you should limit your phrases to alphanumeric characters and spaces, and everything should match as you expect. This option is turned off by default.
All filters, if not inhibited, contribute to permission to show an inline image. For example, if you have a checked site list of *.usps.com, a checked user list of mdevore,butthead, and a checked text list of this is a cool link,lookit,hotlinked image,see here, then images which otherwise meet filter permissions but are from user beavis, which are hosted at flickr.com, or which do not contain one of the four text phrases will not display. Advanced Configuration
The advanced button brings you to a different configuration box and the simple button goes back to the original configuration.
Within the advanced configuration, you can limit the maximum length and width of a displayed image. This setting protects you from displaying images that take up a large portion of your browser view. The default setting is 400 pixels (400px) for both length and width of the image. Oversized images are scaled to the maximum setting.
Analogous to the simple configuration, the next two input fields and checkboxes allow you to explicitly exclude sites from permission to host an inline image and to explicitly exclude MetaFilter users from permission to display an inline image. These advanced options allow you to isolate and filter out bad behavior, rather than narrowly filter in what is accepted. They are off, or inhibited, by default. Exclusions always override inclusions. In other words, if you remove restrictions on sites allowed to host an image in the simple configuration (uncheck the site box), any site listed on the exclusion list remains restricted from displaying images.
The final checkbox allows users to specify that they wish to see a placeholder image for each image that has been restricted by Mondo Image. If the placeholder option is selected, all restricted images show a small graphic which states "Mondo Image restricted. Click image to view inline". When clicked, the placeholder image is replaced by the restricted image. The placeholder is clearly a graphic so it cannot be spoofed by "bad guys", only by those who already have your permission to host an image anyway. Note that overriding a placeholder bypasses Mondo Image's normal controls so any image will not be subjected to the maximum size restrictions. Be careful about clicking the placeholder image to allow an inline image if you are concerned about possibly unsafe sites.
Here are some MetaFilter topics which show inline images with Mondo Image active. Use of these examples does not constitute an endorsement of the views found in the topic.
This Surprisingly, "fargin' bastage" doesn't count topic message shows an inline image using Mondo Image's default settings. This is because it is hosted at the default unrestricted photobucket.com site.
If you add the site www.letchikleha.info to the allowed sites list (like this: *.flickr.com,*.imageshack.us,*.photobucket.com,www.letchikleha.info), then you can see several inline images of clouds in this topic. Remember to reload the page after any changes.
Adding *.usps.com to the site list and viewing this topic displays two inline stamp images from the USPS site. Additional images in that topic can be displayed by allowing more sites. Note that at least one of the stamp images is size restricted by the default 400px limit, normally it would be larger. You can see all images in the topic and elsewhere by unchecking the site limitation box. Some may be concerned about safety when taking that approach. Here, you could reduce exposure by turning off the site limits, but only allowing images from users mannythedog,amro,hovercraft,grouse,Dave Faris. By checking the box Only expand images in messages from these users and placing those names in the user list, only images posted by those five users can be viewed inline.
Following are links to topics which caused problems with earlier versions of Mondo Image and now work correctly: here, here, and here.
If you don't wish to give any user blanket permission to post inline images, then an alternative approach is to keep site limits active, go into advanced configuration, and check the box Show restricted images placeholder with inline image link. In the example topic above, this will present you with several placeholder images which you can individually click to view the associated image.
Be aware that simply because a site has an image file type extension does not mean that it is a direct image link. If you are willing to take a small security risk, for example, temporarily list en.wikipedia.org in your allowed site list, then go to this topic. You will see a hotlinked image icon in the original post that appears broken. This is because the wikipedia link goes to a html page, even though the full link is listed with a .jpg extension. Bah! Placing Wikipedia's site in your unrestricted site list is not recommended.
You can use Firefox's built-in about:config editor to modify the settings used to bring up the configuration box. The offset from the border (default 0) can be changed by modifying the variable clickAreaOffset. The pixel width of the clickable area (default 20) is modified via the variable clickAreaWidth. Border to click at (default both) is set through variable clickAreaDirection and can be left, right, or both borders. Clicks required (default 2) is set through clickAreaClicks. The maximum seconds required to click (default 3) is set via clickAreaSeconds. You are not prohibited from modifying the settings to the point where things won't work. That could be a foolish thing.
Text matches are processed as regular expressions within the confines of \b word boundaries and global case-insensive flag. If you understand regular expressions, you can use this feature to create complex text matching expressions.
Please post questions, problem reports, and comments as a script comment at userscripts.org or leave a comment on the I Fix Scripts weblog.
If you don't report a problem, it won't get fixed; if you don't ask for a feature, it won't get added. Feedback is welcome within broad, nonobscene, limits.
Install the Mondo Image Greasemonkey script. (Alt-click link to download in Firefox)