• 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

How to change image viewer link

1. Open app/lib/classes/class.image.php change this:
PHP:
    public static function getUrlViewer($id_encoded) {
        return G\get_base_url('image/'.$id_encoded);
    }

To this:
PHP:
    public static function getUrlViewer($id_encoded) {
        return G\get_base_url('i/'.$id_encoded);
    }


2. Go to app/routes/overrides/ and create route.i.php with the following:

PHP:
<?php
$route = function($handler) {
    require_once(G_APP_PATH_ROUTES . 'route.image.php');
    $handler->template = 'image';
    $handler::$base_request = 'image';
    return $route($handler);
};
 
But now i have a problem with old image view /image/XXX .. is picture nice but with /i/XXX is viewing picture blurry why? Like with low quality
 
Examples :

First picutre is what i see on /i/XXX
Second picture is what i see on /image/XXX

please how fix that?
 

Attachments

  • 1.jpg
    1.jpg
    501.1 KB · Views: 13
  • 2.jpg
    2.jpg
    714.6 KB · Views: 13
Root htaccess

Code:
RewriteRule ^image/(.*)$ /i/$1 [R=301,NC,L]
 
Root .htaccess file if you run Apache and the code must be placed just after RewriteBase / If you run nginx you will need to add a custom rule to your conf.
 
I dont knwo for me doesnt work. Root htaccess:

Code:
# Disable server signature
#ServerSignature Off

# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
#Options -MultiViews
#Options +FollowSymLinks

<IfModule mod_rewrite.c>

    RewriteEngine On
  
    # If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
    # You will also have to change the path to reflect the path to your Chevereto installation
    # If you are using alias is most likely that you will need this.
    RewriteBase /
    RewriteRule ^image/(.*)$ /i/$1 [R=301,NC,L]

    # 404 images
    # If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
    # Make sure to apply the correct paths to reflect your current installation
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule images/.+\.(gif|jpe?g|png|bmp) - [NC,L,R=404]
    #RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/images/system/404.gif [NC,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
    RewriteRule . index.php [L]
  
</IfModule>
[code]
 
The rule looks fine, tested and it works.

Maybe you have cache somewhere or the rule has conflicts. You will need to ask your hoster.
 
And that edit in class.image and route.i still needed? Or only htaccess? I try everything possibles and still blurry when /i/XXX
 
Last edited by a moderator:
And that edit in class.image and route.i still needed? Or only htaccess? I try everything possibles and still blurry when /i/XXX

All php editing is to mimic /i as /image and to point links to /i. If you don't do the class editing all the links generated will point to /image/<id>.

.htaccess is used to redirect any existing /image link to /i, maybe your server runs nginx or the .htaccess file is cached in the server.

I just tested everything, again, and it works. You will have to ask your hosting company.
 
I know that many will love this news... Virtual /image and /album routing will be added to v3.7.5 and at this very time I'm working on it and once is done the release will be ready. More info here: Chevereto v3.7.5 announcement
 
Back
Top