def METHOD_NAME(obj_model_name, obj_id, for_field):
    """Compress an image of given field for given object."""
    # Get the model of the object, and then get the object itself.
    model = apps.get_model(obj_model_name)
    obj = model.objects.get(id=obj_id)
    for_ = getattr(obj, for_field)
    # Bail silently if nothing to compress. The image was probably deleted.
    if not (for_ and default_storage.exists(for_.name)):
        log.info(f"No file to compress for: {obj_model_name} {obj.id}, {for_field}")
        return
    # Bail silently if not a PNG.
    if not (os.path.splitext(for_.name)[1].lower() == ".png"):
        log.info(f"File is not PNG for: {obj_model_name} {obj.id}, {for_field}")
        return
    log.info(f"Compressing {obj_model_name} {obj.id}: {for_field}")
    _optipng(for_.name)