• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Display image on image request

dovieda

Chevereto Member
Hey guys,

I actually have two questions. For me, if I typed in http://i.imgrev.com/6f7265e2f0167261.jpg -- the picture is displayed just fine. But if I try http://i.imgrev.com/5c (the link to this images page) I get a 500 error... How do I fix this? Obviously the goal here is to have a short link.

Also, how can I make it so requests via the <img> tag display the image? For example:

Code:
<img src="http://imgrev.com/image/5c" />
or hopefully
Code:
<img src="http://i.imgrev.com/5c" />

As of now, it just displays a broken image. How could I make it return the actual image (which would be: http://imgrev.com/i/6f7265e2f0167261.jpg )? I'd like to do this because reddit users can then link to /image/5c -- which would display the picture for reddit enhancement suite users, display for mobile reddit users (hopefully), and for others if they clicked the link -- they would be directed to the page.

Thanks in advance!
 
For question 1, that is most likely an issue in the server side rewriting. 500 errors are rarely triggered at script layer. I don't know how did you make the rewrite or how you are handling the requests in that sub-domain.

For question 2, I won't recommend it because it needs that to server the /5c URL either the server of PHP do a map and server the file in that way which can easily blow out your machine.
 
I didn't actually do any rewrites, at least not manually -- I just added the "i" subdomain in cpanel to direct to my images folder and it worked.

Is there any add-on script, or direction as to where to find out how to do the second part? I'm comfortable with coding something myself but after looking at the mysql database, how does Chevereto know that 5c correlates to 6f7265e2f0167261.jpg or the image_id ?
 
Chevereto uses public ids which are an alphanumeric representation of an integer id. It uses the functions CHV\decodeID($public_id); and CHV\encodeID($id);
 
Back
Top