Open ghost opened 11 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 ) ) )
@metamn The correct index is 'watermark_options' (instead of 'watermarking_options')
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="">';