Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.0k views
in Q2A Core by
I am not sure if this asked before, searched but could not find the answer....

When question owner uploads and image, most of the time image is too small, people cannot read or see clearly to answer, is there a way to make image upload a large size, or put a thumbnail and when user click full size pops up????

Thanks
Q2A version: 1.6.3

2 Answers

0 votes
by
by
Not sure if that solve my problem, because if Q2A resize image, then popup image would be same size, I need to control the image size then popup would be larger.
Question is: Is this plugin let you pick a image size???? or fix the problem that I was explaining?
Thanks
by
Ok, clear.
Generally speaking I think it would not be bad that when you upload an image, only a thumbnail of it (or however a "lighter" one with a smaller size, adapted to the question space size) is attached to the post : this one should be the image that the user sees when he opens a question page.
But when the user clicks on it (because he wants to see the details), a popup (a-la lightbox) should be shown, displaying the image at its original (and bigger) size.
So the CKEditor should manage the uploaded real image, but also a lighter  version of it (created transparently on the fly).
0 votes
by

When you uploaded images with wysiwyg-editor, image size is limited with hard coded value (600px) of wysiwyg-editor.

Core hack example: qa-plugin/wysiwyg-editor/qa-wysiwyg-upload.php (L50)

Before:

qa_get('qa_only_image') ? 600 : null, // max width if it's an image upload
After:
qa_get('qa_only_image') ? 1024 : null, // In this case, max width = 1024px. If you specified "null", then no limit
Override example: qa-include/qa-app-upload.php
function qa_upload_file($localfilename, $sourcefilename, $maxfilesize=null, $onlyimage=false, $imagemaxwidth=null, $imagemaxheight=null) {
  $imagemaxwidth = 1024;  // In this case, max width = 1024px. If you specified "null", then no limit
  return qa_upload_file_base($localfilename, $sourcefilename, $maxfilesize, $onlyimage, $imagemaxwidth, $imagemaxheight);
}
...