scandir
returns an array of filenames not file paths see http://php.net/scandir#refsect1-function.scandir-returnvalues
You need to prefix the path to the filename. Consider something like:
$directory = 'trabajos/tataviajes/';
foreach(scandir($directory, 1) as $filename){
echo '<img src="/'.$directory.$filename.'"/>';
}
also, consider using htmlentities
so special characters in the path will not mess up your markup:
echo '<img src="'.htmlentities('/'.$directory.$filename).'"/>';