Please check this mwe.tex
\documentclass[10pt,xcolor=dvipsnames,xcolor=table,handout]{beamer}
\definecolor{dcol}{HTML}{034da1}
\usetheme{Mwe}
\title{mwe}
\author{mwe}
\institute{mwe}
\begin{document}
\maketitle
\begin{frame}{Table of Contents}
\tableofcontents
\end{frame}
\section{Hello}
\subsection{Hello}
\begin{frame}{Hello Title}
Hello text
\begin{itemize}
\item Hello
\end{itemize}
\end{frame}
\end{document}
and the corresponding beamerthemeMwe.sty:
\mode<presentation>
\usepackage[sfdefault]{roboto}
\usecolortheme[named=dcol]{structure}
\setbeamercolor*{palette primary}{use=structure,fg=white,bg=dcol}
\setbeamercolor*{palette quaternary}{bg=dcol,fg=white}
\setbeamercolor{normal text}{fg=dcol}
%%%%%%%%%%%%%%%%%%%%%
% FOOTLINE
%%%%%%%%%%%%%%%%%%%%%
\defbeamertemplate*{footline}{mat theme}{%
\begin{beamercolorbox}[wd=\paperwidth,ht=0.04\paperheight,dp=2.25ex]{title in head/foot}%
\begin{minipage}[c]{0.25\paperwidth}%
\hskip10pt\insertshortauthor%
\end{minipage}%
\begin{minipage}[c]{0.60\paperwidth}%
\centering
\inserttitle%
\end{minipage}%
\begin{minipage}[t]{0.10\paperwidth}%
\begin{flushright}
\ifnum \insertpagenumber=1
\includegraphics[width=.06\pagewidth]{example-image-a}%\hskip20pt
\else
\insertframenumber{}\hfill\vfill%
\fi
\end{flushright}
\end{minipage}%
\end{beamercolorbox}%
\vfill%
}
\AtBeginDocument{%
\pgfdeclareverticalshading{b@matshade}{\the\paperwidth}
{rgb(0pt)=(1,1,1); rgb(3pt)=(0.8,0.8,0.8);rgb(5pt)=(0.75,0.75,0.75)}
}
The problem is, I would like insert the image from preamble. At present, the logo is hard coded, as example-image-a:
\begin{flushright}
\ifnum \insertpagenumber=1
\includegraphics[width=.06\pagewidth]{example-image-a}%\hskip20pt
\else
\insertframenumber{}\hfill\vfill%
\fi
I am trying to change it, with some option, so that I can change the image in preamble as
\setlogo{example-image-b}
How I can do that?
I have asked this question before, in use variable image in setbeamertheme but the answer is not working, and I had got error (the exact output is not with me right now).
