I am trying to add an image on a page on my docusaurus website, I want to keep the photo high-def and want to show an initial thumbnail that is clickable that expands to the full-size high definition image. I have found how to link the picture to an external webpage, but I want the image to open as a function on the page the picture exists on.
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!
There is requirement where parsys should be added on top of an image. It is like a background image with the provision of parsys so that other components can be dragged and dropped on top of it. I am using html5smartimage for image component. But, no clue yet on how I can get the parsys on top of the image. Please help if you find any ideas. Thanks.
is the image authorable? If so, how do you intend to provide click-area for the authors to change the image vs edit items in the parsys.
If the image isn't authorable, just target the CSS for your parsys and set the image.
If the image is authorable, in edit mode you want the image to be distinct from the parsys and have separate clickable areas. Then in preview/disabled modes you would generate the actually desired markup & CSS to position the parsys content over the background image.
I've spent about 3 hrs last night trying to determine why the image that I upload via the Media Library Picker field keeps resizing to 200x200 when it is displayed in a blog post.
Its not resized after upload and if I insert that same image into the blog post it retains the original size.
I haven't done anything special, I just edited the Blog Post content definition by adding the Media Library Picker field. When I create new blog post, I click the Add button to select the media and then publish the post.
See sample screencap: http://imgur.com/Ju3Sryp
Thanks for the input!
By default, when you are displaying a media library picker field, it gets rendered by Modules/Orchard.MediaLibrary/Views/FieldsMediaLibraryPicker.cshtml. That template loops over the media parts in the field, and calls Display(BuildDisplay(content, "Summary")). That builds the shapes for each of the media content items pointed to by the field. One of these shapes is going to be a Parts_Image shape in your case. Notice that in the BuildDisplay call, a "Summary" display type was passed in. That means that the Parts/Image.Summary.cshtml template is going to be used to render each image. That template has the following code to render the image:
<img width="200" height="200" alt="#mediaPart.AlternateText"
src="#Display.ResizeMediaUrl(
Width: 200, Height: 200, Mode: "crop",
Alignment: "middlecenter", Path: mediaPart.MediaUrl)" />
This is what resizes the image to a 200x200 cropped thumbnail.
If that's not what you want, you'll have to override one of those templates. I'd recommend creating an alternate for FieldsMediaLibraryPicker.cshtml for the specific filed name that you've been using, and in the code, change the display type from "Summary" to "Detail". This way, the Image.cshtml will get used for each image, and that will not do any resizing.
Image resizes into shape by default. You should enable Shape Tracing Module than reload your page than expand shape tracing tool from page bottom than click on the image than create and change alternate.
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'm creating a gallery of images with a thumbnail strip below. I would like to preload these images so that when the user clicks a thumbnail, the image immediately appears. There are quite a few photos though, so I don't want to wait until all images are preloaded until the user is able to click on a thumbnail. How do I allow for the images to load in the background, while allowing the user to click on a thumbnail and that photo appearing?
Here is the page for reference: http://tinyurl.com/lk6e2yx
If you use jQuery for example you can do something like
jQuery(document).on("click", "IMG.thumbnail", function(event){ ... });
That would enable the handler for any element matching now or future with the selector.