Forum Replies Created
-
AuthorPosts
-
Kitty Nicol
ParticipantSorry for the delay in getting back to you. Just wanted to confirm that I have successfully got this working now, and the site load issue resolved itself once I was able to make the code conditional and did not have a whole bunch of broken images.
Thank you very much for your help and perseverance with me, and your great plugins! Much appreciated!
Cheers,
KittyKitty Nicol
Participant^^ That should be
if ( ! empty( $logoHREF ) ) { echo "<image src='$logoHREF'>"; }
But image changed to img. Sorry, it won’t let me edit the post.
Kitty Nicol
ParticipantYes! Thank you so much! That is exactly what I’m after :)
There is a couple of things that happened when I added the code though, it appears that this part massively slows my site down
if ( ! empty( $logoHREF ) ) { echo "
"; }
If I comment that bit out, my site loads fine, but as soon as I have this it takes a very long time to load the page. The other thing is that the listings that don’t have an image added show a broken image, so the conditional part is not working I guess?
Really appreciate your help on this, thanks again!
Kitty Nicol
ParticipantThanks for taking a look. Yes, I understand, and have not mentioned that my image is being cropped but only referenced the crop options (or crop mode as it’s called) because this is what the settings refer to.
The problem is that I will have different sized images for each member. If I set the dimensions to allow for the maximum desired size… how can I upload smaller images without them being scaled up?
My problem is that these options are scaling up my images instead of allowing me to upload different sized images at their natural size. What I’m gathering is that all the images will have to be the same size, is that correct?
Kitty Nicol
ParticipantThanks so much for your help! Here is an example of a listing with the image: https://www.nzgsta.co.nz/our-members/pg/5/
I have attached the image that I upload, but when I view the image on the listing it shows as https://www.nzgsta.co.nz/wp-content/uploads/connections-images/wholesale-seeds/wheat-009ec718fa607b9cfeb44e837e7e2140.jpg so it looks to be resizing the image on upload? My image settings are 600px x 400px, so it is forcing this height to 400px but keeping the width proportional.
The image code in card.php and card-single.php is
<?php if ( 'none' !== $atts['image'] ) { $entry->getImage( array( 'image' => $atts['image'], 'width' => $atts['image_width'], 'height' => $atts['image_height'], 'zc' => $atts['image_crop_mode'], 'fallback' => array( 'type' => $atts['image_fallback'], 'string' => $atts['str_image'], ), ) ); } ?>
Thanks for any further help!
Attachments:
You must be logged in to view attached files.Kitty Nicol
ParticipantThank you again :) Unfortunately this did not help – I am not using the Bio Tray Image, so changing these settings did not have any effect.
The template has been altered, but for the logo image code, it has simply just moved position within the layout and otherwise has not been touched. I am using the “Resize proportionally adjusting the size of scaled image so there are no margins added.” option, but this forces the width or height of the image so that if the image size is less than the specified size, then it is being stretched. It does not look like it is possible to avoid this? It would be ideal to have an option that does not force the image in any way but will allow images of different sizes to be used.
It looks like I can’t achieve what I need with these settings, but thank you for your help! Please do let me know if you have any other suggestions.
Kitty Nicol
ParticipantHi Steven, thank you very much for your reply and instructions. However, this has not changed the image issue because none of the crop options do what I want and they all scale the image up to force it to be the dimensions set. I’m hoping to allow the natural size of the images to be added – in fact I don’t need any cropping done, as I can restrict the image container size with CSS. Is there a way to turn off the forced crop option? I don’t see how the cropping options work for anything other than uniform sized images.
Any further help appreciated!
Cheers
KittyKitty Nicol
ParticipantNever mind… I’ve just come across https://connections-pro.com/add-on/contact/ isn’t it the way that you post a question and then find a solution :) I will give this a go instead. Thanks!
-
AuthorPosts