[Tex/LaTex] Unable to load picture or pdf file, XeTeX, Win 8

compilinggraphicstexstudiowindowsxetex

I was A-OK with my previous Win 7. I have been having this problem ever since I changed to Win 8. I use TeXstudio to edit my files. I get the error below:

Unable to load picture or PDF file 'intro.png'. ^^I^^I^^I\includegraphics{intro.png}

I have a file named 'intro.png' in the directory called.

Some of my code:

\documentclass[11pt,a4paper]{article}
\author{Milad O.}
\title{A Literature Review on\\ Data Partitioning}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{grffile}
\usepackage{graphicx}
\graphicspath{{D:/Textbooks/LaTeX/Figures}}
\usepackage{fontspec}
\defaultfontfeatures{RawFeature= +cpsp,+mark,+mkmk,+ccmp,+kern,
+liga,+pnum,+case,+cpsp}}
\setmainfont{Linux Libertine O}
\begin{document}
    \maketitle
\begin{abstract}
Bla bla bla  
\end{abstract}
    
\section{Introduction}
bla bla bla
\begin{figure}
    \centering
    \includegraphics{intro.png}
\end{figure}
\end{document}

Best Answer

It seems that the problem lies in a missing / at the end of the absolute path. Note as well that the default font features were wrong. I've cleaned your MWE, and it should work. Change the absolute path and the image name to test.

\documentclass[11pt,a4paper]{article}
\usepackage{grffile}
\graphicspath{{/home/test/images/}} % Change the path
\usepackage{fontspec}
\defaultfontfeatures{RawFeature=+cpsp,
    RawFeature=+mark,
    RawFeature=+mkmk,
    RawFeature=+ccmp,
    RawFeature=+kern,
    RawFeature=+liga,
    RawFeature=+pnum,
    RawFeature=+case,
    RawFeature=+cpsp}
\setmainfont{Linux Libertine O}
\usepackage{lipsum}
\begin{document}
\begin{figure}
    \includegraphics[width=\textwidth]{sample.png} % Change the image name
\end{figure}
\lipsum
\end{document}