humanmade / WPThumb

:warning: UNMAINTAINED :warning: On demand image resizing for WordPress
https://humanmade.co.uk/wpthumb/
170 stars 32 forks source link

watermark not working? #49

Open ghost opened 11 years ago

ghost commented 11 years ago

I cannot seem to get watermarking to work using the manual PHP method. I have the URL to a local JPG image that is 1875 × 1275 and the URL to a local PNG image that is 249 × 71. I am creating an image that is 450px wide using wpthumb. I am developing locally. The image is resizing perfectly but I cannot get the watermark to show up at all. I have tried a lot of options and searched the internet for solutions but cannot figure this one out.

Here is the code: $img_src = 'http://playbackmedia.loud/wp-content/shopp_media/livebyfaith-big.jpg'; $watermark_args = array( 'mask' => 'http://playbackmedia.loud/wp-content/themes/playbackmedia/img/pbm-watermark-crop.png', 'padding' => 0, 'position' => 'cc', 'pre_resize' => true ); $img_args = array( 'width' => 450, 'watermark_options' => $watermark_args ); echo '<img src="'.wpthumb( $img_src, $img_args ).'" alt="" class="">';

metamn commented 9 years ago

The same here:

$image = wpthumb( get_field('event_index_exp_img'), array( 'width' => 300, 'height' => 200, 'crop' => 1, 'watermarking_options' => array( 'mask' => 'http://localhost/xx/wp-content/themes/xxx/assets/img/xxx.png', 'position' => 'tl', 'padding' => 10 ) ) )

mocheaz commented 9 years ago

@metamn The correct index is 'watermark_options' (instead of 'watermarking_options')