Maths and conditions in the info section

As a little exercice,
I’m trying to build a complex info section where the number of images of the project is shown,
followed by it’s size.

     info:
        theme: positive
        label: About this project
        type: info
        text: Contains **{{ page.images.count }}** images. For a total of **{{ page.images.niceSize }}**

I would like to create the average image size so {{ page.images.niceSize }}÷{{ page.images.count }}

And then create a condition
if {{ size of each image }} < 300 then display : good else bad

Is something like that doable?

Thanks!

You cannot do such calculations with query language. You need a custom page method that returns the desired values.