Home Forums Plugin Support WP User Frontend Pro image upload in post area: size and link

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  ggsalas 5 years, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5289

    ggsalas
    Participant
    Post count: 108

    Hi,

    The “image upload in post area” works well, but I need insert a medium-size image, not full-size, and linked to a gallery page, not file.

    ¿How can I set this options by default?

    Thanks.

    #5292

    Tareq Hasan
    Keymaster
    Post count: 2831

    For now, you've to open /class/upload.php line 62. It's like this:
    [php]$response[‘html'] = wp_get_attachment_image( $attach[‘attach_id'], ‘full' );[/php]

    Change full to thumbnail. I'll create an option to change size via settings later.

    #5329

    ggsalas
    Participant
    Post count: 108

    Thanks.

    I have modified with medium size:
    $response['html'] = wp_get_attachment_image( $attach['attach_id'], 'medium' );

    But I need set link to attachment page ¿How can I do this?

    #5341

    Tareq Hasan
    Keymaster
    Post count: 2831

    Just change the wp_get_attachment_image with wp_get_attachment_link

    #5346

    ggsalas
    Participant
    Post count: 108

    Perfect: I add “true” for link to image-page.

    $response['html'] = wp_get_attachment_link( $attach['attach_id'], 'medium', true );

    Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘image upload in post area: size and link’ is closed to new replies.