I am trying to include a graphic which need to be rotated, along with the caption and fill the text to the textheight(in my example, this is set to 0.6 of textheight, for demonstration with the example image). This is inside a wrap figure, and I would like to align the wrapfigure to the right side(with the bottom of the captiontext aligned to the right). As of now, This works okey, but the width of the wrap figure is wrong. Changing the value will change the placement of the whole image and caption, but now I need to tweak it. There must be a better way of doing this. I have looked into the rotating-package, but it doesn't give me quite the result I'm after.
\documentclass[11pt]{article}
\usepackage{wrapfig,adjustbox, graphicx, lipsum}
\begin{document}
\begin{wrapfigure}{r}{0.6\textheight}
\vspace{-35pt}
\begin{adjustbox}{addcode={\begin{minipage}{\width}}{\caption{%
Image is huge} \end{minipage}},rotate=90,center}
\includegraphics[width=0.6\textheight]{example-image-b}%
\end{adjustbox}
\end{wrapfigure}
\section{Section text}
\lipsum
\end{document}
An alternative would be to include a section in with the text rotated according to the image, but on top of it. The problem with this approach is that I also have some fancy headers with the \firstleftmark which then produces some wrong results.