Announcement

Collapse
No announcement yet.

Automatic image resizing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • medved
    replied
    Originally posted by Wayne Luke View Post
    That I means you've translated the "Invalid File" error to a language other than English and you're not using UTF-8. Either the file doesn't exist or you do not have permission to view it for some reason.
    And when I am logged out i see there letter Z. How could the images just disappear? And I am using UTF-8.
    Last edited by medved; Thu 17 Jan '19, 2:52pm.

    Leave a comment:


  • Wayne Luke
    replied
    That I means you've translated the "Invalid File" error to a language other than English and you're not using UTF-8. Either the file doesn't exist or you do not have permission to view it for some reason.

    Leave a comment:


  • medved
    replied
    Originally posted by medved View Post
    But i guess the problem will be something else because the file path is SSL: https://sample.com/filedata/fetch?photoid=98767
    It shows me empty withe page with letter: I

    Any idea what other problem it could be?
    Maybe there could be a problem with file permissions. Where could i check the file permissions and to what number they should be set, please? And what permissions the attachments folder should have?

    Leave a comment:


  • medved
    replied
    But i guess the problem will be something else because the file path is SSL: https://sample.com/filedata/fetch?photoid=98767
    It shows me empty withe page with letter: I

    Any idea what other problem it could be?

    Leave a comment:


  • Wayne Luke
    replied
    You would have to discuss server level changes with your hosting provider. I don't know what kind of web server or server configuration you have.

    Leave a comment:


  • medved
    replied
    Thanks for info, but please let me know how can i make a server level redirect?

    AdminCP > Settings > Options > Site Name / URL / Contact Details > vBulletin URL, Login URL, Core URL i have already changed to https.

    Leave a comment:


  • Wayne Luke
    replied
    Yes... Your browser will block HTTP requests if you turn on HTTPS. This isn't something we can control. You need to add a server level redirect so that all HTTP requests get turned into HTTPS requests or use a browser extension like HTTPS Everywhere.

    Leave a comment:


  • medved
    replied
    Originally posted by medved View Post
    OK, it works, thanks for info. But it looks like the old images on the forum stopped working. They are not loading. Is it possible to fix that somehow?
    I was adding also SSL certificate. Could it have something to do with that?

    Leave a comment:


  • medved
    replied
    OK, it works, thanks for info. But it looks like the old images on the forum stopped working. They are not loading. Is it possible to fix that somehow?

    Leave a comment:


  • In Omnibus
    commented on 's reply
    You can edit the dimensions as Wayne Luke shows in the post below but the dimensions and the image size in MB are two different things. You can have huge images that take up less physical memory than small images, depending on things like image file type and DPI resolution.

  • Wayne Luke
    replied
    You can adjust the maximum upload dimensions in the /core/includes/config.php. Current versions of vBulletin 5 allow larger values by default but if you're using an older config.php file, then the changes wouldn't be applied since we don't overwrite that file.
    Code:
    // ******** IMAGE PROCESSING OPTIONS ********
    // Images that exceed either dimension below will not be resized by vBulletin.
    // If you need to resize larger images, alter these settings.
    $config['Misc']['maxwidth'] = 4608;
    $config['Misc']['maxheight'] = 4608;
    That said, resizing isn't miracle work. vBulletin has limitations that a graphic editor does not. The primary one is that we do not know what resources are available on your server. Your limits are from the vBulletin 4.X days. That is a decade ago.

    Leave a comment:


  • medved
    replied
    Originally posted by Wayne Luke View Post

    Before we can resize it down to the limit, the entire image has to be uploaded to the server. At least temporarily. The image triggering the error is over the limit allowed by PHP so will fail before vBulletin can try to resize it. There is no way around this. We cannot manipulate files until the entire file is on the server to begin with.

    The way around this is to increase the file upload limit within PHP. If you want people to be able to upload images directly from their phones, you need to allow 12-16 megapixel images to be uploaded. This means you need to set the PHP variables of upload_max_filesize and post_max_size to at least 16 MB. 20 MB would be better. These are set in your php.ini file. Once the file is uploaded, then vBulletin will attempt to resize it down the limits set in the AdminCP.
    OK, so i was able to o increase the file upload limit within PHP to 20MB. I uploaded the image of 3MB. The forum is set to 1.5MB max. And it worked. The forum did reduce the MB to 937 kB. That is good. But then I wanted to make the image also smaller, to change the dimensions. But this the forum software was not able to do:
    Click image for larger version

Name:	resize.JPG
Views:	139
Size:	26.6 KB
ID:	4406557

    So am I right, the forum is not able to edit also the dimensions?

    Leave a comment:


  • Wayne Luke
    replied
    Originally posted by medved View Post
    Sorry, I meant to lower the number of MB. I need a software to reduce the MB, like for example from image with 20 MB i want the software to reduce it to 1 MB or 600 KB. Because for me is important to save space on the server.
    If you want to upload 20 MB images, then PHP needs to be allowed to accept 20 MB images. If PHP can only accept 4 MB images, the upload will FAIL before it even gets to vBulletin. vBulletin cannot resize a FAILED upgrade. The file won't exist on the server.


    Why users shouldn't be uploading large images taken with smart phone cameras to this site, when you have a software that can reduce the size and MB? Any other technical reasons for that?
    This is a technical support site. It isn't an image sharing site. There is no reason for anyone to upload high resolution photographs to receive support. Screenshots don't have the same resolution as photographs taken with a camera.

    Leave a comment:


  • medved
    replied
    Sorry, I meant to lower the number of MB. I need a software to reduce the MB, like for example from image with 20 MB i want the software to reduce it to 1 MB or 600 KB. Because for me is important to save space on the server.

    Why users shouldn't be uploading large images taken with smart phone cameras to this site, when you have a software that can reduce the size and MB? Any other technical reasons for that?

    Thanks

    Leave a comment:


  • Wayne Luke
    replied
    We do. It is a native function of vBulletin and enabled by default on all installations.

    Our Datacenter team has decided to limit the PHP Upload limit to 4 MB. Don't know why they made that decision. So any file over that limit cannot be uploaded and therefore cannot be resized. It can't be resized because the image would never be uploaded in the first place. This should be fine since users shouldn't be uploading large images taken with smart phone cameras to this site.

    The image below was stored on my machine as a 3000 X 2000 pixel image. Our system would have stored it at a max size of 2000 X 2000. It is stored as 2000 X 1333. I have resized it down further with the functionality of the editor so it fits the browser window. The original 3000 X 2000 image is attached as a ZIP file.
    Click image for larger version

Name:	pexels-photo-87584.jpeg
Views:	133
Size:	137.2 KB
ID:	4406462

    Attached Files
    Last edited by Wayne Luke; Wed 16 Jan '19, 11:53am.

    Leave a comment:

Related Topics

Collapse

Working...
X