I have an image that displays stock quotes update on our website. This is being fed by an external site with a static path pointing to this remote image. (This image gets updated with stock info there). The updates don't happen now and I will have to remove this image on several static web pages on my site until something else is in place.
Is there a way I can over-write this image easily on all pages with a local image within the site? I was wondering if there is a way I can get this done on the site level, may be tweak the apache conf file. Any other work around suggestions. Please let me know. Thanks!!
Add crossorigin attribute to get images from 3rd party websites
example:
<img height="100" width="100" crossorigin=anonymous src="https://media.licdn.com/mpr/mpr/shrinknp_200_200/AAEAAQAAAAAAAAjTAAAAJDNlOGJiNTRkLTJhMzMtNDZlMi05NjJiLTZmMGRhODkzMzVkNw.jpg" />
Related
I am creating a .KMZ file that could be imported to My Google Maps, and I want to use images in description of some Placemarks. KMZ format is just a zipped folder containing KML file with the stucture and then the image files. The problem is I don't know if/how I can link the image files in KML for Google to parse them and use them. Currently my structure is something like this:
main.kmz
-main.kml
-image.jpg
and in main.kmz I link to my image as
<Placemark>
<name>test</name>
<description>
<![CDATA[<img src="image.jpg" width='600' />]]>
</description>
<Point><coordinates>153.4380409849745,-28.07224651054966,10.2340928109942</coordinates></Point>
</Placemark>
But this doesn't work, My Maps don't process the image and all I get is a black rectangle. Strangely enough, if I import the same file to Google Earth Desktop app, the file gets uploaded and processed correctly and shows up.
When I upload the image manually through My Maps interface, it shows up correctly and if I then export the layer as KMZ, I see their image is linked as
<description><![CDATA[<img src="https://lh3.googleusercontent.com/cbMcdkW0FH86QPYuJH_hOBeH0dMgcgevmf9l37Lk5O2Ap0r_gTrZyuREZumY11XW2E3I0r7hpHOpGlCSVG6jMJJFVFbTpxCw71hZORu8YRtyPdv0nRGprLkMefNBCNj4wpHi" height="200" width="auto" />]]></description>
And this shows up correctly. So ideally this is what I want to end up with, but I am not sure if there is any way to let Google know about the image when importing so it stores it in a similar way as when uploading manually and then links it in image description.
When you include an image in a KMZ file, and open it in Earth or Maps, it does not "upload" it to a hosting server, but rather uses it locally in the viewer, directly out of the KMZ. MyMaps can't do that, and needs images hosted online somewhere. As you saw, when you add an image manually, MyMaps will upload it to a hosting server, but does not do that for images embedded in a KMZ that's imported, which is why it's not working for you.
Your KMZ should work in the Google Maps API, if you want to use that to display it. Or you can upload images to public hosting somewhere, and add them via public URLs in the balloons in your KMZ.
Whenever I need to include a picture in a GitHub project's README file I usually just stick it in a Screenshots folder and relatively link to it. However this unnecessarily bloats the file size of the project, especially if I include an animated .gif of the project in action.
I've noticed in a couple popular Github iOS projects (like MMDrawerController and JASidePanels) that the images are NOT relatively linked, but rather they exist on a domain I've never seen - "https://github-camo.global.ssl.fastly.net". Navigating to this site directly doesn't work and Google searches bring up nothing. So for my question: is this site affiliated with GitHub, and how does one get his/her images uploaded here? Of course I could always use a generic image hosting service but I'd prefer to use one that has official ties with GitHub (if such a site exists).
Where is this?
GitHub itself has a "secret" feature to upload images.
I read about this in a comment by GitHub's own Phil Haack:
I edit (or create) an issue and drag it into there and copy the resulting markdown into my post. It's probably an abuse of GitHub issues.
If you do it like this, the image will be stored on some GitHub server, and it will have a URL like this one:
https://f.cloud.github.com/assets/19977/1656110/a3f8b280-5b6d-11e3-818d-c06ab05bd613.jpg
Fastly is not an image host, it's a content delivery network. See their website and this CDN Planet entry.
If you peek at the source code of the README.md page in the MMDrawerController repository, you'll notice that the image aren't initially stored at Fastly.net.
Moreover, they're supposed to be served through standard http (ie. not https).
<p align="center" >
<img src="http://mutualmobile.github.io/MMDrawerController/ExampleImages/example1.png" width="266" height="500"/>
<img src="http://mutualmobile.github.io/MMDrawerController/ExampleImages/example2.png" width="266" height="500"/>
</p>
The links your refer to are dynamically rewritten thanks to the Camo tool.
This tool simplify routing images through an SSL host in order to prevent users from being warned by their browser about potential unsecure content as every GitHub.com content is being served over https.
I built MMDrawerController. I host the images in a gh-pages repo and link to them from the README.
No you don't need a host. just put images in root of your own project and give link in readme.md
something like this
![Preview1](./img1.PNG)
![Preview2](./img2.PNG)
## and so on
Follow these steps to host the image on GitHub's official website.
Visit any repository on GitHub and click your way through to the issues.
Create a new issue by clicking the New Issue button. You'll now see the title and description fields.
Drag and drop an image onto the description field. This will start the uploading process.
Copy the URL and use it in README, issues, or pull requests however you like.
Demonstration of how it works:
Simply open the image you wish to post on GitHub, right-click, Copy Image, then in the Github post, hit ctrl-v.
I have a website that mostly contains images. I would like to redirect all jpg/gif/png links that appear in Google Images when someone clicks "View Original Image" to the post containing the image. Is there a way to do this in .htacess using mod_rewrite?
Google Images now just has an expanding wrapper containing a larger version of the image. It no longer gives you a preloaded "preview" page, the reason being to prevent redirection. As far as I know, this cannot be done. However ,you can prevent your image from appearing in Google Search.
If you are using Wordpress, something like the Imaguard plugin should do the job. And if you're not using WP at least you can download the source code here
http://wordpress.org/extend/plugins/imaguard/
And see how they did it. Seems to be checking for referrer and if not on their white list or local referrer, they redirect to an image with text over . Probably using GD plugin to add text on the fly.
I am working on a ecommerce site built on the top of Nop Commerce 2.3. We want to use CDN for loading all static contents including its images, but not sure how to do this with NopCommerce.
Nopcommerce is set to save binary of images in db at the time of inserting product, and then it generates thumb or re-sized / optimized images at the run time as and when required and stored them in the content folder of the same application for retrieving on page during load time.
Now, suppose on some page, lets say, Home Page, we have 70 product images. I want to distribute it across four host name, so each host name will serve 17/18 images.
This is definitely to save some time in image loading.
Now the Question is:
How to do it in best way in NopCommerce?
The challenges are:
Changing in nop commerce code to load images from CDN instead of its application\content folder. This is not an issue and is fine to manage.
To implement this correctly we might need some mechanism that checks for image on CDN if it doesn't exist, then we might need to transfer the image from content folder to appropriate folder at CDN maybe ? (suggest), and if it doesn't exist in content folder, then need to generate suitable image first and then transfer it.
I'm concerned about this 2nd challenge, and wants to understand the best approach to do this. Moreover, how to do this... specifically check if image exists in CDN or not?
Not very much sure, how to do this? And is it okay or do you suggest something else?
If you use the OVH CDN, you simply point your dns to the CDN dns, add the static file's extensions to the CDN configuration, and let it work for you. All other extensions will pass through. No code to change.
I am trying to link to product photos on my magento installation and have a few questions. What I would like to do is have a standardized url, where I provide the width and SKU and Magento generates the photo.
I believe this is built in to Magento, but can not find the documentation. I want to be able to link to a photo like this (and use the magento cache as well).
http://mysite.com/media/photos/600x600/MYSKU.jpg
How can I tell magento to generate a 600x600 photo at a known url for a given product? I am also using One Pica for CDN to S3/Cloudfront, but that portion shouldn't really be affected.
Magento does have facilities for resizing images, but it typically does so as they are requested by other pages. The catalog/image helper, for instance, can help with this.
If you need to have arbitrary images output by the framework, you'll need to write a controller action for this to generate the newly resized images before returning them. Let me know if you need more detail on that front, but basically, you just need an action that parses the format request and creates the newly resized image on demand.
Your CDN wouldn't be affected in this case, though you could be clever about it and actually serve the assets from the CDN if you wanted to. In that case, you would generate the image, upload it to the CDN on the fly, and then return a 302 response for the resource.
Hope that helps!
Thanks,
Joe