How to render with low quality
bpy.data.scenes[&quot;Scene&quot;].render.image_settings.file_format = 'JPEG'
bpy.data.scenes[&quot;Scene&quot;].render.filepath = './'
bpy.ops.render.render(animation = False) 
img = bpy.data.images[0]
img.save_render('wynik.jpg')