Hi,

From the wiki:

"When the file extension is .auto or method=auto is used, ConTeXt reads the first few bytes of the file to determine the filetype. Such an auto-discovery is useful for remote images that do not have a file extension."

current version: 2023.09.26 18:19

Code:

% SOT
\starttext
  \startplacefigure
    \externalfigure[https://placekitten.com/408/287][method=auto]
  \stopplacefigure
\stoptext
% EOT

Expected: Cute kitten photo.
Actual: Error.

Is this a regression? Or has the syntax changed (stale wiki)?

Specifying the type works (I'd've thought it not necessary to specify the method at all, given both magic headers and HTTP content-type could determine the type):

% SOT
\starttext
  \startplacefigure
    \externalfigure[https://placekitten.com/408/287][method=jpg]
  \stopplacefigure
\stoptext
% EOT

See also:

https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/src/main/java/com/keenwrite/io/MediaTypeSniffer.java#L53

https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/src/main/java/com/keenwrite/io/MediaType.java#L218