Cropping Problem
-
The board members on here have been solid and have figured out some of the issues I have had. I have just a couple glitches left from the “web designer” who left us out-to-dry.
I figured what functions to manipulate in order for to stop adjusting the aspect ratio, but it seems no matter what I do to the photo – it crops the photo incorrectly.
Site: https://addcustomlighting.com/service/chandeliers/ all the products are off a bit and some really off – the “classic outdoor lantern” for example
https://addcustomlighting.com/service/floor-lamps/ <– first floor lamp really good example, cropped at top and bottom
code from my taxonomy-service.php file
if ($image_id){ $items_src.= '<a href="'.get_permalink().'" class="portfolio-item-preview" rel="" title="'.get_the_excerpt().'"><img src="'.$image_small_preview[0].'" width="200" height="200" alt="'.get_the_title().'" /></a>';
full code: https://pastebin.com/GGMWgmYq
code from my function-type-project.php file which when I adjust the numbers, doesnt seem to be affecting the size. maybe the width and height in the above overwrites what is below? not a programmer, just an engineer with some decent logic and migraines over the last few weeks =)
add_image_size( 'project-preview-small', 200, 200, false); add_image_size( 'project-preview-large', 400, 400, false);
full code: https://pastebin.com/uupZcL2S
here is the code for the functions-setup:
https://pastebin.com/hfZJjWjFI’m figuring since I don’t have a standard photo size I am having issues. I shrink my images to be max 500 x Z or Z x 500 for details and the featured image is usually 650 x Z or Z x 650. I’d hate to have to manipulate the images to some other standard; kind of hard given the number of products I need to put up. Also, might not be the issue since I tested the width and height in the ‘taxonomy-service” code and the aspect ratio remains the same on the same cropping occurs regardless of the size (when it is square).
If anything else is needed just ask. Again, I always appreciate the help and headache relief.
- The topic ‘Cropping Problem’ is closed to new replies.