I mainly fixed the problem from the issue Also, extended the class ResponsiveImageFormatter and reused its functions, which resulted in a much smaller formatter.