allow to change permalink_format for posts without breaking image href re-writing