Erro na consulta:
                SELECT
                  tb_produtos.id_categoria, 
                  tb_categorias.categoria,
                  tb_fotos.img
                FROM
                  tb_produtos
                LEFT JOIN tb_categorias ON tb_categorias.id_categoria = tb_produtos.id_categoria
                LEFT JOIN tb_fotos ON tb_fotos.id_produto = tb_produtos.id_produto
                GROUP BY tb_produtos.id_categoria
                ORDER BY tb_produtos.id_categoria ASC

Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'aluminio_AluMnio.tb_fotos.img' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by