image upload in post area: size and link

This topic contains 4 reply and 2 voices, and was last updated by ggsalas 11 years, 5 months ago
Viewing 4 Posts - 1 through 4 (of 4 total)
Author Posts
June 26, 2013 at 6:34 pm 5289
ggsalas 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.
June 26, 2013 at 7:49 pm 5292
Tareq Hasan Tareq Hasan

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.

June 27, 2013 at 3:25 pm 5329
ggsalas ggsalas

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?

June 27, 2013 at 6:27 pm 5341
Tareq Hasan Tareq Hasan

Just change the wp_get_attachment_image with wp_get_attachment_link

June 27, 2013 at 6:58 pm 5346
ggsalas ggsalas

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

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

Thanks!

Viewing 4 Posts - 1 through 4 (of 4 total)