Hi Is there any option in includegraphics in a way that I can specify the maximum width of the figure. If the image is larger than the specified width, it should be resized to its maximum width. Otherwise, it should retain its original size (not stretching!)

All the options I have tried stretched the smaller image to its specified max size :(

  • 2
    \usepackage[export]{adjustbox}\includegraphics[max width=somelength]{...}should do it. – Bernard May 26 '19 at 13:10
  • Bernard's suggestion and a couple others are also found in tex.stackexchange.com/questions/86350, of which I guess your question is a duplicate? – Torbjørn T. May 26 '19 at 17:14