in reply to Insert images on Mojolicious website

Images are "static" file so Ctrl+F "static" and find

|- public # Static file directory (served automatical +ly) | +- index.html # Static HTML file

So you can add  public/images/foo.jpg and you link to it from  public/foo.html with  src="images/foo.jpg"

you can access foo.html as http://localhost../foo.html

Replies are listed 'Best First'.
Re^2: Insert images on Mojolicious website
by pazt (Acolyte) on Aug 22, 2016 at 18:01 UTC

    So you can add public/images/foo.jpg and you link to it from public/foo.html with src="images/foo.jpg"

    Ok. I see. It's needed create a public DIR on myapp structure

    myapp |- myapp.pl |- lib | |- MyApp.pm | +- MyApp | +- Model | +- Users.pm |- t | +- login.t |- public | +- img | +- foo.jpg +- templates |- layouts | +- default.html.ep |- index.html.ep +- protected.html.ep

    Thanks beech