miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

Different <img...> source shown for the same .jpg

Author jdc
Registered
#1 | Posted: 11 Oct 2014 05:32 
minibb seems to be inconsistent in creating <img...> elements for the same .jpg for different browsers.

Please see (I couldn't think of another way to get the symptoms to you):
(minibb's domain)/forums/storage/misc/bug.zip

Author tom322
Registered
#2 | Posted: 11 Oct 2014 17:15 
I think it's up to browsers how they present an image and it has nothing to do with minibb. If you open any image in different browsers and compare the 'inner' code, it's different, eg. http://upload.wikimedia.org/wikipedia/commons/1/1e/Stonehenge.jpg (open it in opera vs. chrome and inspect the HTML/CSS to see a difference).

Author jdc
Registered
#3 | Posted: 11 Oct 2014 23:17 
If you look at: (minibb's domain)/forums/storage/misc/bug.zip, you will see the two <img ...> elements that produced the images at the browser. They are quite different. While I agree that browsers may differ in how they present a given <img ...>, I do not think that the browser actually MODIFIES the <img> tag's content without using javascript (and in any case, without a javascript script present).

The correct htm (copied from inspect element in firefox and opera) begins: <img class="shrinkToFit" ...>
The incorrect html (copied from inspect element in IE and chrome) begins: <img style="-webkit-user-select: none" ...>

These tests were conducted with javascript off. Are you saying that the browsers somehow created (or modified) the <img> tags' html after the html was generated by minibb and passed to the browser? If so, could please describe what this method could be.

Thanks for your help.

Author Paul
Lead Developer
#4 | Posted: 12 Oct 2014 19:49 
Sorry, at this point I do not understand what your problem is even about.

In your bug description you refer to a direct .jpg file. How minibb could be related to a direct image file? In no way. If this is a file you insert in miniBB some way, then I'd prefer to see the direct link to a message, where this link and/or image appears.

By default, miniBB doesn't generate the class names you have mentioned. If you paste the image using BB code / button for images, by default miniBB doesn't attach class names. The code it inserts, is present under bb_codes.php -> enCodeBB function.

You may have some add-on installed, which adds those classes. But miniBB, for sure, doesn't care what browser you use and of course it will not substitute specific CSS for different browsers.

Author jdc
Registered
#5 | Posted: 13 Oct 2014 02:45 
Please go to: boernerc . org > "Members Only" > "Marketplace" > "For Sale..." > left click on either of the JPGs
Right click on the image presented and select "Inspect Element"

If you are using firefox, <img class="shrinkToFit" src= ...> is visible
If you are using IE, <img style="-webkit-user-select: none" src= ...> is visible

My question is: where did the class= or the style= come from? I don't think I can insert them by simply adding a file to a post. Since javascript is off (and no script is present), I don't know how the browsers could add them. Also, the term"shrinkToFit" raises a question merely by its name. Perhaps the rendering engines add these terms to all <img> tags? I don't know...

Author Paul
Lead Developer
#6 | Posted: 13 Oct 2014 13:56 
I suppose, "shrinkToFit" class and the whole HTML code in the Inspect Element section of Firefox, are generated internally by Firefox and they do not have something common to miniBB nor to any other web software. Proof: open your forums following the direct URL, not the iframe'd version, like http://www.boernerc.org/minibb/index.php, then locate the topic you mention and you will see images are present with the only direct links and not kind of any HTML tag. Then if you click some of the links, it will point to its direct URL with the .jpg extension, and if you Inspect Element of this image, you will see basically the same code. Naturally, JPG could not generate any kind of HTML code, so this is purely Firefox' interpretation. The same could be seen also on our forums, for example, if you open this image (the direct JPG) and Inspect Element of it, you will see Firefox even adds two classes - "decoded shrinkToFit" which are in no way associated with the website which generates the HTML content, because there is HTML content, which obviously generated by FF itself for binary sources.

I'm not sure - why would you need to worry about all of this stuff? It doesn't affect the working of your website. You should more look in the HTML source, not in the source of Inspecting tools.

Specific miniBB Support Forums / Specific / Different <img...> source shown for the same .jpg Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB