I use this code to display an image in the upper right corner. It is displayed on all pages, including the title page.
The important thing is to know how to show only in the content pages, that is, not to show it in the title pages (front, back cover, acknowledgments), nor in the table of contents, nor in the list of tables, nor in the list of figures.
I would also like to know how I can use LaTex to find out the height and width of the image in points. And use those height and width values to adjust the position, 0.5\valuewidth, 0.5\valueheight, and not like now that I do it manually.
The image I use is 6cm in height and width. And I use \put() to adjust it.
\documentclass{article}
\usepackage{eso-pic,xcolor}
\usepackage{graphicx}
\usepackage{transparent}
\newcommand\AtPageUpperRight[1]{\AtPageUpperLeft{
\makebox[\paperwidth][r]{#1}}}
\AddToShipoutPictureBG{
\put(80,85){%Desplazamos la imagen
\AtPageUpperRight{
\raisebox{-\height}{
\transparent{0.10}\includegraphics{images/logo/molino6.0cm.png}
}
}
}
}


trimandclipoptions of\includegraphicsto crop the image. Alternatively, useadjustbox. See Trim, crop, and resize picture; there you have access to\Widthand\Height. The other answer sets the image in a box\sbox{\mybox}{\includegraphics[.]{..}}after which the width/height is available as\wd\mybox/\ht\mybox. – Werner Nov 22 '21 at 17:03