Image url in template

I see that the problem comes from juegos[5]. What happens is that there is nothing, in python (no template) it refers to the row of the result of the query, there are not 5 rows… there are only two (in this case). If instead of juegos[5] I put juegos[1] if it prints the array with the result 1

in this definition

def home():
    id_user=current_user.id
    juegos = obtener_report_por_id_user(db,id_user)
    return render_template('home.html', juegos=juegos)

If I do a normal juegos print, all the rows appear.

if I do print(juegos[0][1]), field 1 of the first row appears.

I think I already have it
in the def I have left

return render_template('home.html', juegos=juegos,img_path=url_for('static', filename=juegos))

and in template

<img src="{{ url_for('static', filename=juego[5]) }}" class="img-fluid" alt="">

That is correct, yes.

Hmm. That probably means your template will need a loop in it. That should be possible, but it’s a bit more work. Here’s some info from the documentation: Template Designer Documentation — Jinja Documentation (3.0.x)