shiro0507
Forum Replies Created
-
Read the html codes of multisite carefully, I found that the filename of each image was lacking [width]x[height] parameters on the tail of its filename. And that made me think that this problem was caused by somewhere that was controlling image sizes.
Then I grepped the plugin folder with several keywords, and I found su_image_resize() function that was doing resizes. Then debugged the function line by line. But it took 5 hours totally, to find out that the cause was a file path. The code modification was only 5 mins. Heavy.
yey congrats
The su slider on my multisite had a problem like you, the height of the image loaded in the slider was not right as I had expected. After some analysis I found that su_image_resize() in inc/core/tools.php was not working correctly.
What I did was:
Change line290 from this$file_path = str_replace( $blog_details->path . ‘files/’, ‘/wp-content/blogs.dir/’ . $blog_id . ‘/files/’, $file_path );
to this.
$file_path = str_replace( $blog_details->path, ‘/****/’, $file_path );
*insert your multisite directory in ****
This su_image_resize() function does resizing of the image files set in a shortcode.
The line290 is setting a file path to the image to load in a shortcode, but the file path set in the line290 is not correct as it is. Need to be changed if we use the multisite mode.So, in my case, by changing this path, the height of the image is set correctly as I set in the shortcode.