Advertisement:

Author Topic: Plugin dimension issue  (Read 2728 times)

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Plugin dimension issue
« on: April 05, 2019, 12:05:28 PM »
I am using Google for translation. Sorry for the translation.

The problem I'm experiencing, the size of the images uploaded to the plug-ins, despite the size of 1200x1200 size, unfortunately, is being uploaded to its original size.


I want it loaded in the size I want. What do you think is missing?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,267
  • Gender: Male
    • Kindred-999 on GitHub
Re: Plugin dimension issue
« Reply #1 on: April 05, 2019, 12:30:50 PM »
I'm sorry, but the translation is unclear and I am not sure what you are asking about.

What Plugins?

We do have support boards in various languages....
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #2 on: April 05, 2019, 12:46:27 PM »
Do you want attachment images resized to a specific size?

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #3 on: April 05, 2019, 12:52:58 PM »
Do you want attachment images resized to a specific size?

Yes, I would like to resize both existing plugins and newly added plugin images.

The pre-sizing was working, but it doesn't work right now.




Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #4 on: April 05, 2019, 01:07:39 PM »
https://custom.simplemachines.org/mods/index.php?mod=2206

This mod will resize attached images and save resized images to /attachments.  Don't believe there's any way to resize existing attachments, other than doing it manually one file at a time.  There are apps that will bulk resize image files, but don't think they will work on attachments because of hashed file names.  It will probably break things if you try to resize existing attachments because original image dimensions are saved in database.



Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #5 on: April 05, 2019, 01:29:53 PM »
https://custom.simplemachines.org/mods/index.php?mod=2206

This mod will resize attached images and save resized images to /attachments.  Don't believe there's any way to resize existing attachments, other than doing it manually one file at a time.  There are apps that will bulk resize image files, but don't think they will work on attachments because of hashed file names.  It will probably break things if you try to resize existing attachments because original image dimensions are saved in database.


Thanks I'm using the mode you say.

The mode settings are as follows. image img_1

uploads new image when installing the original size. image img_2

What I want is a 1200x1200 size installation, so I don't think it's the size I want.




Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,267
  • Gender: Male
    • Kindred-999 on GitHub
Re: Plugin dimension issue
« Reply #6 on: April 05, 2019, 01:50:32 PM »
If you are using a mod which is not working, then you really need to ask for help in the support thread dedicated to that specific mod.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #7 on: April 05, 2019, 01:57:16 PM »
If you are using a mod which is not working, then you really need to ask for help in the support thread dedicated to that specific mod.

Does this smf not have the original image resizing? Does this feature exist without mod?

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,045
  • Gender: Male
    • Macedonian electronics forum
Re: Plugin dimension issue
« Reply #8 on: April 05, 2019, 10:17:02 PM »
Yes, it does, but only for the avatars and the image thumbnails when "Display image attachments as pictures under post" is ticked. It doesn't resize and recompress the uploaded attachments in any way, except the avatars.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #9 on: April 06, 2019, 08:00:05 AM »
Yes, it does, but only for the avatars and the image thumbnails when "Display image attachments as pictures under post" is ticked. It doesn't resize and recompress the uploaded attachments in any way, except the avatars.

We have added new images we want to combine the resolution of the resolution is saved in that resolution. What I want is to add it to the resolution I want.

Currently I have 4608x3456 I want this resolution to save at 1200x1200.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #10 on: April 06, 2019, 03:41:16 PM »
Image resizing is not a core feature, you have to use a mod.  There is no simple way to resize existing attachments.

Offline drewactual

  • Full Member
  • ***
  • Posts: 627
    • College Football Fan Site CFB51
Re: Plugin dimension issue
« Reply #11 on: April 06, 2019, 04:29:16 PM »
CSS. Use CSS.... Some performance scanners dont like it, but it is the most certain way to control image display sizes.

Go to your page.  Right click view source. Find the image in question.  Find the unique div id and/or class... Make entry into css file:
Code: [Select]
#(the unique div id) .(the unique div class) img{ max-width:*your maximum width wanted in percentage; height:auto
For instance, an image in a post would be:
Code: [Select]
.post img{max-width:80%;height:auto}
That^ would make images in a post (such as what I'm making now) no wider than 80% of the post area... Play with percentages as needed for your desired display,

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,842
Re: Plugin dimension issue
« Reply #12 on: April 06, 2019, 04:38:49 PM »
css does not work well with attachments unless the op is showing the thumbnail full size.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #13 on: April 06, 2019, 05:02:02 PM »
Works good with [img][/img] tags -

Code: [Select]

.bbc_img
{
border: 0;
max-width: 750px;
max-height: auto;
}


But not much help here. :(

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #14 on: May 27, 2019, 03:02:13 AM »
I don't have a problem with Css, what I want is the image I want to download from the plugin.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,267
  • Gender: Male
    • Kindred-999 on GitHub
Re: Plugin dimension issue
« Reply #15 on: May 27, 2019, 11:41:13 AM »
I don't have a problem with Css, what I want is the image I want to download from the plugin.

What??




If you are using a mod which is not working, then you really need to ask for help in the support thread dedicated to that specific mod.
Image resizing is not a core feature, you have to use a mod.  There is no simple way to resize existing attachments.

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #16 on: May 27, 2019, 02:21:45 PM »
I don't have a problem with Css, what I want is the image I want to download from the plugin.

What??
6



If you are using a mod which is not working, then you really need to ask for help in the support thread dedicated to that specific mod.
Image resizing is not a core feature, you have to use a mod.  There is no simple way to resize existing attachments.


Due to these pictures, the ram is overloaded and the site is stuck. What is the reason. There are 90k pictures as attachments.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #17 on: May 27, 2019, 10:53:54 PM »
90kb image files should be no problem on any decent server.  I have members uploading attachments larger than 6mb.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,024
    • StoryBB/StoryBB on GitHub
Re: Plugin dimension issue
« Reply #18 on: May 28, 2019, 01:34:44 AM »
I think he is saying he has 90,000 attachments though.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #19 on: May 28, 2019, 11:54:53 AM »
90kb image files should be no problem on any decent server.  I have members uploading attachments larger than 6mb.

I tried to say that Arantor said

I think he is saying he has 90,000 attachments though.

exactly

As you say
------------

I'm getting an error like this. When I'm trying to upload a plug-in image

Error message: Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.

What could be the cause of this error.

When I add 4 images.
« Last Edit: May 28, 2019, 12:18:15 PM by tarantula901 »

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,267
  • Gender: Male
    • Kindred-999 on GitHub
Re: Plugin dimension issue
« Reply #20 on: May 28, 2019, 12:26:32 PM »
it's a bad header in the file...

either because it's a false positive or because the file has actually been tampered with.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #21 on: May 28, 2019, 03:24:50 PM »
it's a bad header in the file...

either because it's a false positive or because the file has actually been tampered with.

I'm getting the error you need to upload one of the photos taken by iPhone

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,842
Re: Plugin dimension issue
« Reply #22 on: May 28, 2019, 03:30:42 PM »
no language string in SMF includes iPhone. that must be from a mod. as such you need to post in the mods support topic.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #23 on: May 28, 2019, 04:26:33 PM »
I think he is saying he has 90,000 attachments though.

Does SMF have a limit?  Most I can remember seeing on any one forum was maybe 30-40,000.  Only problem I ran into is if there's more than 10k in one directory, some ftp configurations won't display more than 9998 files, and cpanel filemanagers pretty much choke on those numbers, so it's difficult to work with the files.

Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 847
Re: Plugin dimension issue
« Reply #24 on: May 28, 2019, 04:28:59 PM »
Just wondering, in Attachment Settings, is "Perform extensive security checks on uploaded image attachments" actvated ?
2.0.15, ssl, php 7.1.25, MySQL 10.1.30-MariaDB-1~xenial
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown.

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #25 on: May 28, 2019, 05:24:48 PM »
Just wondering, in Attachment Settings, is "Perform extensive security checks on uploaded image attachments" actvated ?

If I make it off, I get the same warning

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #26 on: May 28, 2019, 05:29:22 PM »
Can you attach the image file here?

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #27 on: May 29, 2019, 07:45:20 AM »
 This site is not installed. The error I get from this site.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #28 on: May 29, 2019, 11:46:42 AM »
Something is seriously wrong with the file.  You didn't have any problem posting the screenshot.


Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #29 on: May 29, 2019, 03:20:20 PM »
Due to the photos taken from the İphoneden this error is mostly

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,842
Re: Plugin dimension issue
« Reply #30 on: May 29, 2019, 04:01:24 PM »
try installing https://custom.simplemachines.org/mods/index.php?mod=4111 and see if that helps.

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #31 on: May 31, 2019, 05:14:27 PM »
try installing https://custom.simplemachines.org/mods/index.php?mod=4111 and see if that helps.

I was using it before you said it.

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #32 on: June 05, 2019, 07:15:39 PM »
Is there anyone who can help?

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #33 on: June 05, 2019, 08:49:26 PM »
PM sent.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #34 on: June 05, 2019, 10:00:33 PM »
No problem attaching the images on test install or here.  I get 500 error when adding third and fourth on this forum, but all four images are attached.


Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #35 on: June 07, 2019, 10:28:32 AM »

add one by one you don't get error. but I guess getting the error adding them at the same time.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,045
  • Gender: Male
    • Macedonian electronics forum
Re: Plugin dimension issue
« Reply #36 on: June 08, 2019, 04:08:51 AM »
Why don't you just save them as a PNG and then recompress them to JPG again ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #37 on: June 14, 2019, 05:01:55 PM »

I get an error when I try to add 4 of this image. This site

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #38 on: June 14, 2019, 10:26:54 PM »
You can only attach two at a time here.  Can add additional attachments by modifying post.


Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #39 on: June 15, 2019, 11:54:06 AM »
Do you think the problem originated from hosting. Do you have any idea as to what hosting settings you need to set?

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,014
Re: Plugin dimension issue
« Reply #40 on: June 15, 2019, 04:11:42 PM »
Which problem are we dealing with, your original resize question or uploading multiple attachments?

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #41 on: June 22, 2019, 05:02:36 PM »
Which problem are we dealing with, your original resize question or uploading multiple attachments?

This problem is not loading more than one image, images are not loading if the manufacturer is large.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,267
  • Gender: Male
    • Kindred-999 on GitHub
Re: Plugin dimension issue
« Reply #42 on: June 22, 2019, 06:34:41 PM »
that is a server issue with available memory
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline tarantula901

  • Jr. Member
  • **
  • Posts: 307
Re: Plugin dimension issue
« Reply #43 on: June 23, 2019, 10:05:34 AM »
that is a server issue with available memory

How do you solve the problem

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,267
  • Gender: Male
    • Kindred-999 on GitHub
Re: Plugin dimension issue
« Reply #44 on: June 23, 2019, 10:27:23 PM »
Talk to your host.  It may involve buying a dedicated server,  depending on what your host offers in shared servers
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Sesquipedalian

  • The Mad Doctor
  • On Hiatus
  • Sr. Member
  • *
  • Posts: 900
  • Gender: Male
  • It works! ... in theory.
    • Sesquipedalian on GitHub
Re: Plugin dimension issue
« Reply #45 on: June 24, 2019, 02:04:24 PM »
Yes, this sounds like the server is running out of resources while trying to process the very large image files.

Unfortunately, installing a mod to resize image attachments to a smaller size will only make this problem worse. This is because resizing an image requires the server to use even more resources in order to process the file. Moreover, since most web servers do not have a GPU, they are not very efficient at processing image files.

So, tarantula901, there are several ways to solve your problem:

1. Upgrade to a more powerful server, as Kindred suggested. This will be effective, but it can be expensive.

2. Buy more storage for your existing server and don’t try to resize image attachments at all.

3. Change the limits on SMF’s Attachments Settings page in order to reduce the amount of image data your server needs to process at once. There are several settings you can adjust, depending on your needs. For example:
  • You could reduce the maximum file size that an attachment is allowed to have. This would prevent large images from being uploaded, which would force your users to upload a smaller version of an image instead of the full sized image.
  • You could reduce the maximum number of attachments that a post is allowed to have. Your users could still upload large image files, but they would have to make several posts in order to attach all the images.
  • You could turn off the option to create thumbnails, since creating thumbnails is a type of resizing. This would reduce the strain on your server while still allowing your users to upload many large image files in a single post. However, it will also increase the amount of data your server has to send when people view your forum, which will make your pages load more slowly and will increase the amount of bandwidth your site uses each month. I don’t recommend doing this unless you need to.

Of course, these solutions can be combined in whatever way works best for you.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.