Make output into a clickable link in Excel. Put "=hyperlink( [...] )" around the output and when you paste it into excel it will be a link.
SELECT DISTINCT
lastname, firstname, '=hyperlink("C:\' + some_value + '.jpg")'
FROM [table_with_link_values]