How to remove the link of an image on WP 4.2

The option for setting the url to none using “Attachment Display Settings” is available through the gallery option, using “Add Media”. How are you adding your images—through featured image or directly in your post/page? You can remove the my image if it’s in the post itself.

For featured images, you’ll have to go into your template file and remove the link wrapper from your images. If you have conditions for this functionality, like for example, only certain categories become unlinked, you can add a condition for that circumstance.

<?php if ( has_post_thumbnail() ) : ?>
    <a href="https://wordpress.stackexchange.com/questions/198737/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    <?php the_post_thumbnail(); ?>
    </a>
<?php endif; ?>

to this:

<?php if ( has_post_thumbnail() ) : ?>
    <?php the_post_thumbnail(); ?>
<?php endif; ?>