We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Message / Chat attachment size [Solved] | Forum

Topic location: Forum home » Support » General Questions
Ole Rasmussen
Ole Rasmussen Apr 11 '15
All images attached to messages and in the the Chat gets re-sized to 667*1000, it's fine to resize for display in Chat and Messeges but why isn't it linked to the original size - like in the gallery.

Is there a workaround / hack for that?


/Ole



The Forum post is edited by Taissa Apr 16 '15
dave Leader
dave Apr 11 '15
I assume it has to do with process load.  I have also noticed that Oxwall makes several different sizes of the image rather than resize the main image each request depending on its purpose.  My assumption is that it takes less IO and system load to display a smaller picture which is already created than it does to resize the original each time.  Which if you have a large site makes sense. 


As far as a workaround, can you explain a bit more, not sure what the workaround would be for.  


dave


Ole Rasmussen
Ole Rasmussen Apr 11 '15
What I really would like is that the full size image is kept and linked to when the re-sized is shown.


When you attach an image to a chat, it is uploaded to the server then re-sized and shown in the chat, all that is fine but why not link to the original file so it can be shown full size in a new window :-/


Ole

tammy harris
tammy harris Apr 12 '15
it is 

i seen a setting some where to keep original image maybe you dont have that set 
as when i click image in chat original opens in new window 
dave Leader
dave Apr 12 '15
maybe something new?   i dont see anything like that in settings... did you find anything Tammy?
tammy harris
tammy harris Apr 12 '15
i didnt look but i remember see it somewhere
tammy harris
tammy harris Apr 12 '15
/photo/admin
show and store full size photos
but i tryed turn that off but still images attached in chat open in new window 

the only other thing i can think of maybe theme missing 
html_document in theme master pages
The Forum post is edited by tammy harris Apr 12 '15
dave Leader
dave Apr 12 '15
cool,  nice job Tammy, i didnt think to look inside the actual plugin settings lol... this is the first time i have looked at that since they came out with the new format.   


Nice.... :)

tammy harris
tammy harris Apr 12 '15
the only other thing i can think of maybe theme missing 
html_document in theme master pages
Ole Rasmussen
Ole Rasmussen Apr 12 '15
No it's not that.

In the gallery's it works fine, there I can store and view the full size images.

The problem is in CHAT and MAIL, any image attached to a chat or massage IS resized to 667x1000 :-(. It is shown as a thumbnail in the chat/message, clicking it opens the resized image in a new window.

I DO NOT WANT IT RESIZED AT ALL

Ole Rasmussen
Ole Rasmussen Apr 12 '15
Does the same resize on all themes :-(


dave Leader
dave Apr 12 '15
it may only affect new images not old ones once you change that.  Have you tried a fresh image since the change? 


Also i guess you could change the core code link to the image to link to the large one hard coded? 

Ole Rasmussen
Ole Rasmussen Apr 12 '15
Doesn't work. Changing the settings in the Photo plugin does NOT effect the Message/Chat plugin :-(

All resized images get stored in /ow_userfiles/plugins/mailbox/attachments and they are all resized images NOT the original images - they are nowhere to be found :-(


Taissa Team
Taissa Apr 15 '15
Ole Rasmussen, to change the resize settings you need to edit /ow_system_plugin/base/bol/attachment_service.php file.

Find this lines:

 if ( in_array(UTIL_File::getExtension($fileInfo['name']), array('jpg', 'jpeg', 'gif', 'png')) )
        {
            try
            {
                $image = new UTIL_Image($fileInfo['tmp_name']);
 
                if ( empty($dimensions) )
                {
                   $dimensions = array('width' => 1000, 'height' => 1000);
                }
 
                $image->resizeImage($dimensions['width'], $dimensions['height'])->orientateImage()->saveImage($tempPath);
                $image->destroy();
                @unlink($fileInfo['tmp_name']);
            }

Edit the values in this line:

   $dimensions = array('width' => 1000, 'height' => 1000);


These settings are set by default as 1000 for optimising the image uploading. They make your website is faster to load for visitors, you get more out of your web quota and it takes much longer before you need to worry about exceeding your bandwidth.

Please note that images are not the only factor affecting site performance, disk space and data transfer. However, they are often the most common cause of slow loading websites.
Ole Rasmussen
Ole Rasmussen Apr 16 '15
Thank you Taissa :-)

That was it :-) Now I'm a happy sailor.
Well, I have no worries about bandwidth, disk quotas or speed. I run my own server on a flatrate 20/20Mbit fiber connection, so bring it on ;)


Taissa Team
Taissa Apr 16 '15
Great! :) I'm going to mark this thread as Solved.
Ole Rasmussen
Ole Rasmussen Apr 18 '15
Do that :-)