Support » Plugin: WP User Frontend » [Plugin: WP User Frontend] Remove Image Link

  • This plugin is great and is working fine on my website, though I would like to make a minor tweak.

    When a user uploads an image with a post, it shows on the post page with a hyperlink to the image file URL (opens a larger version of the image). I would like to remove this link.

    I did experiment myself and found the following line under wp-user-frontend/wpuf-functions.php:

    $attach .= sprintf( ‘

  • <img src=”%s” alt=”%s” />
  • ‘, $file[‘url’], $thumb[0], esc_attr( $file[‘title’] ) );

    If you remove the a href tag, then the link will be removed but it no longer gets resized to a thumbnail on the post page, which is not convenient if users upload large image files.

    How can I remove this image link without having an effect on thumbnail resizing?

Viewing 1 replies (of 1 total)
  • Hi,

    Try to delete the line 632 in functions.php:

    $attach .= sprintf( ‘

  • %s
  • ‘, $file[‘url’], esc_attr( $file[‘title’] ), $file[‘title’] );