I'm using a custom content template. Within the template, I'm telling it to pickup an image that is a size set by my theme. The size is defined in my theme (photo-block). I'm using code like this: [types field='photo-box-2' title='%%TITLE%%' alt='%%ALT%%' size='photo-block' proportional='false' resize='proportional'][/types]
Whatever I choose for the proportional or resize, it keeps bringin back images with "wpcf"
So instead of the image being:
hidden link
It is bringing back:
hidden link
The issue here is I have a program that I'm trying to use to adjust the crop. It is working but since it's not looking at your wpcf version of that crop, it is picking up the wrong crop.
Where is the wpcf coming from???
-Caroline
Hello,
I have tried it with below steps in a fresh wordpress installation + the latest version of Toolset plugins + 2017 theme, with below steps:
1) Add below codes into theme file "functions.php":
add_image_size( 'photo-block', 220, 180 );
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'photo-block' => __( 'photo block' ),
) );
}
2) Create a custom image field "photo-box-2" with Types plugin
3) Create a post, upload a image to image field "photo-box-2", display the image using the same shortcode as you mentioned above, it works fine, see screenshot: image.JPG
It does output image without "wpcf".
4) But I can see the problem when select an existed image(before add the custom PHP codes) in image field "photo-box-2".
Is it the problem you mentioned above?
If it is, it is expected result, since these image in custom "photo-block" size images are not created when you upload the image, Types image shortcode will create them, and add the "wpcf" in the image name.
I suggest you try these:
1) Upload those image again, it will generate the images in different size without "wpcf".
2) Adjust your custom program, pick up the "wpcf" images.
These images were all updated after I had the custom code in place. This only started to happen when I updated to the latest version of Toolset. Same EXACT code but on a staging site and older version of Toolset and you can see it doesn't call the wpcf.
hidden link
I even tried to upload new versions of the same file thinking what you're saying here that I had to regenerate the thumbnail and it still keeps putting in the wpcf version.
Please try these:
1) Deactivate other plugins and switch to wordpress default theme 2017, use the custom codes as I mentioned above:
https://toolset.com/forums/topic/image-not-picking-up-theme-sizes-creating-its-own/#post-1147751
Step 1) , And test again
2) If the problem persists, please provide a copy of your website, also point out the problem page URL, I need to duplicate the same problem and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/