Loading images from other sites?

Posted In HTML & CSS
  • jhon-micky 1 week ago
    Hello everyone,,,,
    I'm trying to build a page that basically just uses Gelbooru's API, I'm using for entirely personal/meme purposes.
    
    Here's my problem:
    [https://showbox.bio/](https://showbox.bio//) [https://tutuapp.uno/](https://tutuapp.uno/) [https://vidmate.vet/](https://vidmate.vet/)
    I can't load images that I don't click on myself.
    
    If I inspect the page, and open the image, I can view it after I reload the page. If I right click the icon that appears for failed to load images, I cannot open the image (404).
    
    Despite this, only previously loaded images work.
    
    The image's URL does not change between the linked URL and the 404ing URL.
    
    The console when I view my page is FILLED, absolutely filled with 503 errors.
    
    What can I do to get around this?
    
    edit: I fixed it pretty quickly. The Gelbooru site adds a sample thumbnail image url which does not note the referrer tag in the header of the requests, so I could just use that if I wanted to, but since I wanted the option to be able to use high definition images, I simply added this bit of information in the header of my HTML file:
    
    <meta name="referrer" content="no-referrer" />
    This pretty much made me completely able to use full definition images from the site, but they load pretty quickly so I keep the sample thumbnail for now.
    
    And btw, don't worry about me linking to other sites, I'm perfectly aware of what can happen in this way, but I don't think the Gelbooru staff can pinpoint my ip among thousands potentially accessing their API every hour (discord bots, other sites, viewers using scraper programs, etc.).
    
    In the mean time, I was able to add a base64 converter so I'm not even having my user make requests if I want, the server can do the requests and encoding for me all at once if I specify.
    
    So yeah, problem solved I guess, it was just the referrer in the header that tipped Gelbooru off and had them give me a fake 404 (actually a 503).
    
    

    Hello everyone,,,, I'm trying to build a page that basically just uses Gelbooru's API, I'm using for entirely personal/meme purposes.

    Here's my problem: https://showbox.bio/ https://tutuapp.uno/ https://vidmate.vet/ I can't load images that I don't click on myself.

    If I inspect the page, and open the image, I can view it after I reload the page. If I right click the icon that appears for failed to load images, I cannot open the image (404).

    Despite this, only previously loaded images work.

    The image's URL does not change between the linked URL and the 404ing URL.

    The console when I view my page is FILLED, absolutely filled with 503 errors.

    What can I do to get around this?

    edit: I fixed it pretty quickly. The Gelbooru site adds a sample thumbnail image url which does not note the referrer tag in the header of the requests, so I could just use that if I wanted to, but since I wanted the option to be able to use high definition images, I simply added this bit of information in the header of my HTML file:

    And btw, don't worry about me linking to other sites, I'm perfectly aware of what can happen in this way, but I don't think the Gelbooru staff can pinpoint my ip among thousands potentially accessing their API every hour (discord bots, other sites, viewers using scraper programs, etc.).

    In the mean time, I was able to add a base64 converter so I'm not even having my user make requests if I want, the server can do the requests and encoding for me all at once if I specify.

    So yeah, problem solved I guess, it was just the referrer in the header that tipped Gelbooru off and had them give me a fake 404 (actually a 503).

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
tnylea
Cheers Friend!

I'm Tony, the creator of this site. I'm trying to increase my twitter following. Want to follow me?

Follow @tnylea If not, no worries :)