When posting a link in a comment on a Facebook post, there's a small square thumbnail included in the link preview. My preview images are usually rectangular and so Facebook selects how to crop this into a square for the link preview. I've noticed in some images, there is a detectable person in the image and so the crop is taken around that. However, in other images where the content isn't entirely clear, the crop is just taken from the centre of the image, leaving the image empty as my content is usually on the sides.
The crop seems to be done using some parameters (sx sy sw sh), in the facebook comment itself:
center crop:
https://external-lht6-1.xx.fbcdn.net/safe_image.php?d=AQDVaAOputB_VkrO&w=90&h=90&url=...&cfs=1&upscale=1&_nc_hash=...
right crop:
https://external-lht6-1.xx.fbcdn.net/safe_image.php?d=AQAny2E3bpUGVeYX&w=90&h=90&url=...&cfs=1&upscale=1&sx=280&sy=0&sw=396&sh=396&_nc_hash=...
Is there a way to choose the square crop parameter values for the link preview? I can't see an option to do this from the debugging tools (https://developers.facebook.com/tools/debug/sharing/), and I can't see any options when actually posting the link in a Facebook comment. Perhaps there's a way to control this using the image alt tag? I have not seen anything in the Facebook API that might help. I understand I can change the preview image to a square but I don't want to take that route unless I have to.
Related
I have a blog hosted by Blogger with a custom template: http://www.drugchannels.net/
Images uploaded to the blog are hosted at X.bp.blogspot.com (where X is a number). Examples:
https://1.bp.blogspot.com/-Jwy2VQYRIEA/WqmwvsA07WI/AAAAAAAATA4/jWVcEts1h1Y4IXM0hD0njUhSmQ2AZPnxQCLcBGAs/s1600/Specialty_vs_Retail-2014_vs_2017.png
https://4.bp.blogspot.com/-O4S9ps4u67k/Wk0yhTEuV-I/AAAAAAAASUE/5tPedr-p7_4kedNYU4RY711l6K3maokiQCLcBGAs/s1600/DCI-Copay_Accumulator-03Jan2018-CORRECTED.png
I want to have a white background when the image is clicked. (The images look fine on the site itself. This is not a problem with the blog's background, which is set to be solid white.)
Using the Inspect option in Chrome, I see the following information
The body formatting (background: #0e0e0e;) does NOT appear anywhere on my blog or in my template.
How can I fix?
Thank you!
P.S. I have 10 years of legacy posts with images, so I need a global solution that changes the background to white for all images posted to the blog.
Wrap the image in a div and set the background color of that div with css. That should work
.divclass:active {
background:#FFFFFF
}
If you are opening the images in a new tab or window then your only option is changing the background of the images yourself with a photo editor. If you're just trying to give the user a full size view of an image when they click it you could use javascript/jquery and have a full size div with a background and an image pop up in full screen without sending them to the linked image. Theres probably quite a few jquery plugins that will do this with minimal coding knowledge, just google it.
Thanks, Riley.
I can't go back and edit hundreds of images, so the photo editor option won't work.
But based on your suggestion, I used the following solution:
1) Enabled "Showcase Images with Lightbox" on blogger
2) Added CSS from this page (http://www.howbloggerz.com/2016/05/how-to-customize-blogger-lightbox.html) with no background image and background color set ot white (#ffffff).
Downside is that charts/images now pop up on same page rather than opening in a new tab.
Thank you!
Posting content to Yammer was a feature we'd successfully implemented a while back but now we are getting reports that the image is broken and showing a grey jigsaw. As well as this we noticed Yammer have changed the layout of posts. We originally were using a profile image, which would now look ridiculous with the layout changing to a squarer rectangle with a large image behind it.
This is the image:
https://cli-cdn.release.workstars.net/jantestvr-3ntsv7ypjestvj0e/employee_images/FzAhje2Cf6gdSKiNkMlEGTZQPvHI5Ju0BxDq7.png
This is url that produces the jigsaw:
https://thumbnails.yammer.com/preview?url=https%3A%2F%2Fcli-cdn.release.workstars.net%2Fjantestvr-3ntsv7ypjestvj0e%2Femployee_images%2FFzAhje2Cf6gdSKiNkMlEGTZQPvHI5Ju0BxDq7.png&signature=RJK%2Fo8yt2vv6DeXXtLrKa5%2BWThnUoXdWAHSIYLPNYqI%3D
Has something changed in the way you need to encode the POST data? I can't get anything other than a jigsaw trying things with the url manually. Also, any way to force the original layout of a full width rectangle with a square image floated inside to the left?
I have a Content Slider (All-in-one-banner sort of) on the home page of my website.
Every time this banner slides onto the next image in the queue, the other images (png format) on my page are getting pixelated. Especially it happens in Chrome.
Images and Icons such as the logos, icons used for navigation, etc... - they get pixelated when a new slide changes on the banner.
Please help me.
Demo link (Open in chrome):
When the slides in the banner change, Look at the logo on the top and the logos to the right, and also the profile pics below,: indiaemerge.com/ieys2013
The solution I could figure out is that one should NOT use an image with large dimensions.
For example: I was trying to use an image of size 800px X 400px to fit it into a division of 200px X 50px. Because of this the image was getting distorted when slides would change.
I reduced the dimensions and resolution of the image to match the target division's dimensions and it worked.
Another way to fix this is to use an svg image file.
So the lesson to be learnt here is that always try to use an image (in case it is png or jpg) whose size meets your requirement as precisely as possible. If it is an svg image file then there won't be any problem.
I am trying to reference images with a greater height than width (portrait format) in KML script for Google Earth; however, the image always comes out as landscape, or rotated left 90 degrees, e.g.
<img id="id_photo" src="2012_01_21-dscf03.jpg" width="500"></img>
I've tried everything I could think of. Is there a image tag to correct this, e.g., format="portrait"?
Thanks,
Walter
This sounds like an example of EXIF only rotation. Which GE probably doesn't honour.
Some cameras etc, 'rotate' a image so its the right way up by setting a flag in the EXIF data. The raw JPG itself, is still in the landscape format.
A display (or convert) program, should hopefilly notice this 'rotation required' flag, and rotate the image.
But Google Earth probably doesnt honor it, so you are just seeing the baseline image as its actully stored (unrotated)
Recommend trying one of the applications mentioned here:
http://jpegclub.org/losslessapps.html
(many note they have automatic correction - so should "fix" your jpg files)
This is already an old thread, but I stumbled on the same problem. And did not find a solution for my situation. Eventually I found a way around, so I thought I'd share it here.
Basically the solution is to rotate the offending images twice, once 90° to the left and then back again.
What you had was an image with a width larger than the height, but with an orientation tag that tells an application to rotate it 90° (but Google Earth does not).
After rotating it twice it is an image with width and height switched, and an orientation tag that says not to rotate it.
Now any application, including Google Earth, will display it correctly.
I used ExifTool to write the tags for all my images to a CSV file, created a list from that with all the pictures to rotate, and used that list to tell IrfanView twice to rotate them.
I have a .NET 2.0 web project. I need a simple image carousel. What I would prefer is the main image on the top, and a scrolling bar with smaller images on the bottom. When the user hovers over or clicks the smaller image, it would populate the larger image space.
If you know of anything like this, even 3rd party paid controls, please recommend them.
jQuery is the way to go here is the google search result:
http://www.google.com/search?aq=0&oq=jquery+image+car&sourceid=chrome&ie=UTF-8&q=jquery+image+carousel