Front page | perl.perl5.porters | Postings from June 2022

## Re: Pre-RFC: images in Pod

From:
Oodler 577 via perl5-porters
Date:
June 10, 2022 01:14
Subject:
Re: Pre-RFC: images in Pod
Message ID:
YqKau4ZJCJ0eflo6@odin.sdf-eu.org
* Neil Bowers <neilb@neilb.org> [2022-06-09 23:24:53 +0100]:

> Revisiting this after something of a gap ? here?s the basic case:
>
> 	P<There can be only one|https://highlander.org/macleod.png>
>
> Q1: how should this be rendered if an image can?t be displayed? Someone commented that styling should be left to formatters, but I think podspec should propose a standard rendering as text.

"alt" text, just like in HTML is my suggestion.

However, if something is being displayed in the gopherverse, for example,

>
> Q2: should we support non http URLs? For example a CPAN dist might want to bundle images for the doc (and have them turn up on MetaCPAN), and the Perl distribution might want to include images for diagrams: P<illustration of method resolution|images/mro.png>. That?s like to get hairy, so one option is to say that v1 just supports http URLs and worry about relative paths if there?s a call for it.

Some joker is going to recommend supporting embedded data URLs and sprites,
I can see it now. <_< ... >_> ..

>
> Seems sensible to allow optional dimensions with an additional parameter:
>
> 	P<There can be only one|https://highlander.org/macleod.png|640x480>

Since the primary target outside of the terminal is going to be HTML, may
want to throw some text flow information in there. And someone is inevitably
going to want to put a L<> around it.

>
> Q3: I often just put just a width on images, so it should probably allow that. I.e. P<alt text|https://foo.com/bar.png|320>. Should any other format of dimensions be supported?

LaTeX might be useful to anticipate the extremes of what might be "requested":

Basic example,

\begin{figure}[h]
\includegraphics[width=9cm]{sun}
\end{figure}

https://www.resurchify.com/latex_tutorial/latex_images.php

I do caution that allowing images on a site like MetaCPAN is going to invite
abuse. It happens. And this is going to invite minders; and this is going to
invite screams of censorship, etc. Just pointing that out before Pandora's
Box is opened a little more here.

Cheers,
Brett

>
> Neil

--
--
oodler@cpan.org
oodler577@sdf-eu.org
SDF-EU Public Access UNIX System - http://sdfeu.org
irc.perl.org #openmp #pdl #native