Use a different slug for identical sizes so that they have different names.
Thread Starter
krang
(@krang)
The original thumb is defined as “custom-170” and in imageFX I’ve set a greyscale filter with a slug of “custom-170-bw”.
Still no luck!
Hello,
I am having the same issue. I am using wordpress 3.5. The image is being outputted for some images but not all.
I have two images defined at the same size:
add_image_size(‘front-thumb’, 231, 158, true);
add_image_size(‘front-thumb-black’, 231, 158, true);
In the plugin settings I have font-thumb-black set to a slug of bw
I checked the upload folder and both images with the correct size are there, one with the slug -bw appendeded to it with the correct color filtering.
When I write out both images to the page using wp_get_attachment_image:
$output .= wp_get_attachment_image( $attachments[ $id ]->ID, ‘front-thumb’, 0, array( ‘class’ => ‘normal’, ‘data-id’ => $attachments[ $id ]->ID));
$output .= wp_get_attachment_image( $attachments[ $id ]->ID, ‘front-thumb-black’, 0, array( ‘class’ => ‘bw’, ‘data-id’ => $attachments[ $id ]->ID));
I am looping through images in a gallery and displaying these two images a few images have the correct URL with -bw appended, but the majority of them have the same url.
Thanks!
**Update
After further investigation the only JPEG images are being converted to black and white. PNG images are being ignored
I’m having an issue with this too.
I have defined 2 images sizes
add_image_size( 'logo', 152, 64, true );
add_image_size( 'logo-bw', 152, 64, true );
and in the settings, one has no filter and the other has the grayscale filter.
but when debugging, both image sizes have the same URL
'logo' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'http://bijma.dev/wp-content/uploads/2012/12/Logo-Philips_m1-152x64.jpg'</font> <i>(length=70)</i>
'logo-bw' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'http://bijma.dev/wp-content/uploads/2012/12/Logo-Philips_m1-152x64.jpg'</font> <i>(length=70)</i>
here’s screensho of my settings
http://www.evernote.com/shard/s3/sh/b5aea222-47eb-4fa2-b946-67ce018119c6/9c67d63bbe1e280de3e71547d408ec52
A lot of the image stuff changed in 3.5, I’d be surprised if it still works at all at the moment.
thanks Otto. any pointers on doing this with the new media features?
Nope. I have not investigated them extensively. My Javascript-fu is weak.
thanks, I’m getting help from Joe trying to get it to work with WPThumb which extends the WP_Image_editor class
https://github.com/humanmade/WPThumb/issues/48#issuecomment-12051778