Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6.1 is here with critical security patches. One of them has been publicly disclosed.

Image Thumbs in the Posts

Hi folks, is there any Plugin for setuping the default sizes of images in the Posts.
Sometimes people are posting rlly big pictures.. and this looks so unfriendly and just 2 big..
How can i setup one default size for every picture? That means, when i post a picture 1200x860, it should be automaticly converted to let me say.. 400x400 as thumbnail

Comments

  • K17K17 Unlosk · Français / French ✭✭✭

    Why do not just resize with css ?

  • Flower420Flower420 Munich New

    Ye in css i can resize it.. but i cant make thums of it.. or can i?

  • K17K17 Unlosk · Français / French ✭✭✭

    Don't know. I think it can be bad because you will have to make something run on your webserver to do the work so it will decrease speed.
    I think it(s best to resize with css only.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 5

    there is a plug-in control size and also configurations for max size and thumb size

    $Configuration['Garden']['Thumbnail']['Size']='40';
    $Configuration['Garden']['UploadImage']['Quality']='50';

    K17
  • Flower420Flower420 Munich New

    Perfect answer rightly on my Bday.. thank you vrijvlinder <3

    One last question.. it is possible to disable EXIF in the config tho for uploaded pictures?
    @R_J (Hast du da vielleicht einen Tipp für mich? / Could you maybe help me out)

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
    edited January 7

    Concerning the EXIF info I see three options.

    The most secure would be to never ever upload pictures with EXIF data. I found this piece of code which seems to do exactly that. It would have to be combined with all the places where you can upload images somehow. Although that being the most secure option, it would be hard to implement in a secure way. So it might not be the best idea.

    Vanilla uses the UploadImage class. You can also go this way to remove EXIF as early as possible. Hook into the SaveAs event and remove the EXIF after the image has been saved. Don't forget the thumbnails!
    But a developer doesn't have to use this class. So there might be pictures still with EXIF data available.

    If you have the possibility to install software on your server and run cron jobs, you can use exiftool to remove exif information from all files in the upload folder every X minutes.

    Considering all that I would say that a combination of the JavaScript and the exiftool approach would be the best solution.

  • K17K17 Unlosk · Français / French ✭✭✭

    Why not let EXIF data in pictures ?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
  • Flower420Flower420 Munich New
    edited January 7

    Exactly R_J, i will later post a detailed bash script for it :)
    cuz its important to use absolute paths when you use exiftool in cron cuz 'file' or 'application' wont run..

Sign In or Register to comment.