def remove_image_permissions(apps, schema_editor):
 ContentType = apps.get_model(u'contenttypes.ContentType')
 Permission = apps.get_model(u'auth.Permission')
 image_content_type = ContentType.objects.get(model=u'image', app_label=u'wagtailimages')
 Permission.objects.filter(content_type=image_content_type, codename__in=(u'add_image', u'change_image', u'delete_image')).delete()

def remove_image_permissions ( apps , schema_editor ) : ContentType = apps . get_model ( u'contenttypes.ContentType' ) Permission = apps . get_model ( u'auth.Permission' ) image_content_type = ContentType . objects . get ( model = u'image' , app_label = u'wagtailimages' ) Permission . objects . filter ( content_type = image_content_type , codename__in = ( u'add_image' , u'change_image' , u'delete_image' ) ) . delete ( )
reverse the above additions of permissions .