Giter Club home page Giter Club logo

loremflickr's People

Contributors

mastababa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

loremflickr's Issues

cross-origin

Hey there

I'm new to programming but I'm fairly sure there's a problem with trying to manipulate image data on a canvas with an image on it that is hosted on loremflickr. This problem arises from a security issue with cross-orgin data in which the getImageData() call on a canvasrenderingcontext object will throw an error. This happens when using images from a non CORS-friendly host. I was hoping there was something you could do on your end to rectify it.

Cheers

Allow for some consistency

It would be very useful in certain cases, especially in larger prototypes, to get some consistency in which random images are shown where on a page.

I'm aware that browser caching makes this possible to some degree by adding meaningless query strings to URLs, but I'd like for this to also work across different browsers and machines. (It's a little distracting if working with another developer and the page looks totally different on their screen.)

One way to achieve this would be to allow some user-provided string as part of the URL (whether query string or another slash-separated chunk). On the server side this would be hashed with whatever hashing algorithm is cheap, and then that hash wrapped into an integer. That integer can then be used to choose an image (such as $possibleImages[$integer % count($possibleImages)]), or the integer or hash or string can be used to seed the random number generator, or some other such scheme. The important thing is a repeatable result.

It wouldn't have to always produce the same image forever -- if the same string gave a different image a week or two down the line that's no big deal.

A possible extra benefit of something like this is that when such a request is served, it could have long caching headers attached to it, since you'd expect to serve the same image the next time the same request comes through. This would make LoremFlickr much more cachable (by a CDN proxy for example, or development teams' in-house caching HTTP proxies, etc) for such requests, hopefully reducing load on your end.

Resolution dimensions

Will it be possible to only require one dimension for the resolution?
For example, if I go to "http://loremflickr.com/320/dog" it will get a dog picture with an X resolution of 320 and any Y resolution, or even just "http://loremflickr.com/dog" to get a dog picture with any resolution.
Or is that a flickr API restriction?

Just wanted to say thank you :)

I'm using loremflickr.com and it works perfectly! The response time is not perfect, but works better than many other well known placeholder websites :)

I hope you keep it running!

Header Access-Control-Allow-Origin: * is missing when loading from cache

HI,
When a picture is loaded from cache header Access-Control-Allow-Origin: * is missing.

Access to Image at 'http://loremflickr.com/cache/images/9613e56670c083e23db82f469d199252.53.jpg' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access.

Could you add those headers please?

Not working

Thanks for sharing!.
After editing the variables in initialize.php. I am getting an empty image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.