I can't think of a simple solution, but here's a possible solution that adapts the internals command used by \includegraphics.
\documentclass{article}
\usepackage{graphicx}
\makeatletter
\newcommand{\jpg@Ginclude@graphics}[1]{%
\begingroup
\let\input@path\Ginput@path
\filename@parse{#1}%
\def\Gin@ext{.jpg}%
\def\Gin@base{\filename@area\filename@base}%
\Gread@jpg{\Gin@base}%
\Gin@viewport@code\Gin@nat@height\Gin@ury bp%
\advance\Gin@nat@height-\Gin@lly bp%
\Gin@nat@width \Gin@urx bp%
\advance\Gin@nat@width-\Gin@llx bp%
\Gin@req@sizes
\expandafter\ifx\csname Ginclude@jpg\endcsname\relax
\Gin@drafttrue
\expandafter\ifx\csname Gread@jpg\endcsname\relax
\@latex@error {Can not include graphics of type: jpg}\@ehc
\global\let\Gread@jpg\@empty
\fi
\fi
\leavevmode
\ifGin@draft
\hb@xt@
\Gin@req@width{\vrule \hss \vbox to \Gin@req@height{\hrule \@width
\Gin@req@width \vss
\edef\@tempa{\Gin@base}%
\rlap{\ttfamily\expandafter\strip@prefix\meaning\@tempa}%
\vss\hrule}\hss\vrule
}%
\else
\@addtofilelist{\Gin@base}%
\ProvidesFile{\Gin@base}[Graphic file (type jpg)]%
\setbox\z@\hbox{\Ginclude@jpg{\Gin@base}}%
\dp\z@\z@\ht\z@\Gin@req@height\wd\z@\Gin@req@width\box\z@
\fi
\endgroup
}%
\newcommand{\includejpgnoext}[2][]{%
\begingroup
\let\Ginclude@graphics\jpg@Ginclude@graphics
\includegraphics[#1]{#2}%
\endgroup
}
\makeatother
\begin{document}
\includejpgnoext{sample} % jpg image file called 'sample' with no extension
\end{document}
It only works with PDFLaTeX.
sample.jpgthat links tosample. – samcarter_is_at_topanswers.xyz Jul 25 '17 at 12:57\documentclassand ending with\end{document}. – Bobyandbob Jul 25 '17 at 14:07contextyou could use something like `\starttext\externalfigure[test][method=png]
\stoptext` seems to work
– samcarter_is_at_topanswers.xyz Jul 25 '17 at 14:43