added support for regenerate-thumbnails and get_attached_file()