Is there a way to hotlink images from a Box account - box-api

I would like to view images on my box account natively inside a simple rails app. The goal is to run a slide-show with these images. I looked for the necessary parameters to pass each images relative url into a <img source> tag. It appears that I can only download images, or view them from within the Box application.
Is this accurate, or did I miss something within the Box API documentation?

When you create a shared link for a file, there is a download_url attribute that can be used to link directly to the file.
http://developers.box.com/docs/#files-create-a-shared-link-for-a-file

Related

Random images on 'refresh' in HTML without JavaScript

I once saw in a tutorial video about an HTML line of code that generates random images that it fetches from the internet and puts into the webpage, I remember it being a normal img tag but inside the ref attribute contained a link that now I don't remember what it was.
Searched about this in Google but all I could find was about loading images from the directory or using the help of Javascript.
This is possible by delegating the randomness to the server that serves the images. Consider the service provided by PlaceIMG. Setting any <img/> tag to one of their URLs will let your show a "random" image. What is actually happening is that the backend gets a request for an image and serves any image it wants.
You can do this with your own, self-hosted image server and in basically any server-side language and without client-side JavaScript. However, there has to be logic somewhere to do the randomness:
<img src="https://placeimg.com/640/480/any" />
There are many sites that serve as random image source, for example https://picsum.photos.
Working example (refresh to see the effect):
<img src="https://picsum.photos/200">

Can I custom edit WordPress image pages?

When I upload images to WordPress I have the ability to click "View" when hovering over those images. This takes me to a permalinked page with the image title as the url and it uses the default post format.
These image pages don't appear on posts, or even pages. They seem to be intrinsically attached to the image. I can't seem to customise each page separately because they just grab the default post format that my theme provides and there's no way to actually access the pages.
I've searched around in my hosting panel but can't find anything. The images are there, the default post type is there, but nothing that is editable. The images have unique URL's so I assume they have to be stored somewhere. Is there a way to manually access each image page?
Create attachment.php in your template page, and change how you want
https://developer.wordpress.org/themes/template-files-section/attachment-template-files

Is any image link suitable for suitable for adding in html file?

I know I can add images to a html file by the following syntax
<img src="*****">
But my question is can i copy any images link from the web and add them to my html file?
i'm not talking about the copyright laws regarding this, just, can every image link be used as the image source in html?
I was writing a code in codepen where i embedded a link to an image from devianart, but the image didn't show up.
I think it depends to the website policy; Some websites don't let you to use their hosted images in your webpage, and some others do.
this is what i find on W3schools:
Definition and Usage:
The required src attribute specifies the URL of the image.
Note: When a web page loads; it is the browser, at that moment, that gets the image from a web server and inserts it into the page. Therefore, make sure that the image actually stay in the same spot in relation to the web page, otherwise your visitors will get a broken link icon. The broken link icon is shown if the browser cannot find the image.
The URL of the image.
Possible values:
An absolute URL - points to another web site (like
src="http://www.example.com/image.gif")
A relative URL - points to a file within a web site (like
src="image.gif")
Hope this is helpful :)
make sure image fully open in your browser tab/
i also check it but it work in codepen may be you doing something wrong first need to write clear what you want
try this image tag in codepen

HTML Attachments opened in Apple device not showing some images

I am wondering if someone can help me with a problem I am encountering with iPhone/iPad. I have an email the generates a report as an HTML attachment. In that HTML attachment, there are two images. One is a static image that pulls down a logo using a normal HTML img tag.
The other is dynamic. It also uses the normal HTML img tag, however it calls out to a web api with some information identifying the user.
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm}" >
The Web API uses information on the user to return appropriate images to them. For some reason the dynamic image does not show up with the attachment is opened on an iPad/iPhone.
The image works just fine when the attachment is opened from a computer. I thought maybe something might be blocking images, however then I would expect the static image not to display as well. I verified that the "Load Remote Images" setting is turned on.
I am at a loss here. Is there something with iOS that prevents dynamically generated images from showing in HTML attachments?
Thanks
Ok, I can't explain why the above is not working, but I did find something that does. Instead of using the following URL
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm}" >
use
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm.jpg}/" >
The final param needs to end with ".jpg/". If the slash is not there, you will get a 404 error.
Then in the API method, you simply strip off the .jpg part of "OtherParm" to get the intended value for "OtherParm".

HTML Add images dynamically to iframe (like a text editor)

can anybody tell me hw to add images in an iframe at runtime. I am making a text editor using iframe and i want the facility for the user to add images to it by clicking a button.
Thanks in advance
You first need to upload your image to your site so you need to create a backend piece of code that manages that, you can send your image to the site via an Ajax call, and have the server respond with the same image.
Try looking here http://css-tricks.com/6522-ajax-image-uploading/
After that you should just display it in your iframe.