Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
Responsive image plugin
Creates a html image tag with the image height and width set to 100% for use with responsive templates
Avatar
SFITCS #1
User title: Scott Ferguson
Member since Dec 2014 · 463 posts · Location: Canberra, Australia
Group memberships: Members
Show profile · Link to this post
Subject: Responsive image plugin
Instead of only being able to use the standard
{{wiki:dokuwiki-128.png}}
give the option of being able to select an image from Media Manager and have it coded as
<html>
<img style='max-width: 100%; height: auto;'
src='/wiki/lib/exe/fetch.php?media=dokuwiki-128.png' alt='some picture'/>
</html>

Please note the use of the alt tag - something that is missing from the standard Dokuwiki, sorely needed for accessibility reasons, and favoured by search engines.

The html version will allow the image to be made smaller if a responsive template is used and the browser window is small.

Additional features:- inside a href tag for a link; a mouse-over caption using the title tag; a positional div tag


Thanks for your consideration


Edit - after Ach pointed out that the Dokuwiki default template does support resizing to suit the window (and that I was simply using, um, less than optimal templates) I'll close this wish, and later open new ones for the alt tag to be included as part of the core; and a plugin be created to support the HTML5 srcset tag.
This post was edited on 2015-07-06, 16:29 by SFITCS.
Avatar
ach (Administrator) #2
Member since May 2006 · 1926 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
You don't need a plugin for this. Any half-decent and recent enough template should support responsive images out of the box. (The default 'dokuwiki' template does.)
If a template does not support it, you should rather file a bug report for that template.
You can also add just a few lines of code to your user styles...

Now, alt parameters are a different matter. They should ideally be fixed in the core.
Avatar
SFITCS #3
User title: Scott Ferguson
Member since Dec 2014 · 463 posts · Location: Canberra, Australia
Group memberships: Members
Show profile · Link to this post
Quote by ach:
You don't need a plugin for this. Any half-decent and recent enough template should support responsive images out of the box. (The default 'dokuwiki' template does.)

Agreed.

If a template does not support it, you should rather file a bug report for that template.
<snipped>

I will do.


Kind regards
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-22, 02:36:01 (UTC +02:00)