[Tex/LaTex] How to keep the original resolution of inserted image in sharelatex

fontsgraphicsresolutionsharelatex

I have exported the flowchart either in JPEG, and PNG format, and tried to insert this images to my latex project. Unfortunately, the image was blurred, text in the image can be shown normal if I open it on image viewer, but in latex, text hard to read it. My image resolution is 1002 x 1132. Why image resolution can't be preserved? How can I avoid blurred image in latex? Can anyone help me out how to resolve this issue? Any idea please?

Here is my latex code:

\begin{figure}[H]
    \includegraphics[width=\textwidth,height=0.685\textheight, scale=0.9]{workflow}
    \centering
    \caption{workflow}
    \label{fig: workflow}
\end{figure}

This is the original image I want to insert on my latex project original imaged. (Note that this image is generated by draw.io online tool)

This is the screenshot of the blurred image in latex:

inserted image in sharelatex

Best Answer

For such graphics containing text and sharp lines it is better to use a vector format such as .pdf. From draw.io, you can export it to .pdf

enter image description here

This pdf can be included in the same way you currently include your image, but to avoid image distortion, only specify either width, length or scale.

\begin{figure}[htpb]
    \includegraphics[width=\textwidth]{workflow}
    %\centering
    \caption{workflow}
    \label{fig: workflow}
\end{figure}
Related Question