How can I add classes to images or links?
The best way is to use Image Styles or Link Styles. That allows you to configure a list of classnames and a user-friendly label, which can be applied by the user without having to remember the exact name.
This replaces "Advanced Attributes" from Redactor 2.