I have a two-column minipage environment with a figure in the left minipage (represented by a box) and some text in the right, see below.
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}
\parindent=0pt
\begin{document}
\rule{\textwidth}{0.5pt}
\begin{minipage}[t]{0.5\textwidth}
\vspace{0pt}
\centering
\framebox(150,100){}
\end{minipage}%
%
\begin{minipage}[t]{0.5\textwidth}
\vspace{0pt}
\lipsum[2]
\end{minipage}
\end{document}
For some reason some extra vertical space is introduced above the minipage environment and below the rule. Why does this occur, and how can I get rid of the extra vertical space?

[t]to minipage, meanwhile at first case you use default positioning, which is vertical centered. – Zarko Dec 20 '23 at 19:36example-imagewhich is a test image available for such tests, then people can reproduce to see exactly the issue, it's hard to know where the white space is in an image file we don't have. – David Carlisle Dec 20 '23 at 23:41example-image, thank you for making me aware. In the process, I discovered that my own image had a white border, making it not appearing aligned with the text. I have edited the post accordingly. – DavidH Dec 21 '23 at 07:43