Repository: streamlit/streamlit

Issue:
Remove st.image format parameter once and for all
See #1137

![image](https://user-images.githubusercontent.com/856034/105384603-6c238080-5be0-11eb-9918-86fc62c81c1d.png)



Discussion:

Resolving patch:
diff --git a/e2e/scripts/st_image.py b/e2e/scripts/st_image.py
--- a/e2e/scripts/st_image.py
+++ b/e2e/scripts/st_image.py
@@ -18,11 +18,6 @@
 img = np.repeat(0, 10000).reshape(100, 100)
 img800 = np.repeat(0, 640000).reshape(800, 800)
 
-st.set_option("deprecation.showImageFormat", True)
-st.image(img, caption="Black Square with deprecated format", format="JPEG", width=100)
-
-st.set_option("deprecation.showImageFormat", False)
-st.image(img, caption="Black Square with deprecated format", format="JPEG", width=100)
 
 st.image(img, caption="Black Square as JPEG", output_format="JPEG", width=100)
 
diff --git a/lib/streamlit/config.py b/lib/streamlit/config.py
--- a/lib/streamlit/config.py
+++ b/lib/streamlit/config.py
@@ -646,14 +646,6 @@ def _browser_server_port():
     expiration_date="2021-01-06",
 )
 
-_create_option(
-    "deprecation.showImageFormat",
-    description="Set to false to disable the deprecation warning for the image format parameter.",
-    default_val="True",
-    scriptable="True",
-    type_=bool,
-)
-
 _create_option(
     "deprecation.showPyplotGlobalUse",
     description="Set to false to disable the deprecation warning for using the global pyplot instance.",
diff --git a/lib/streamlit/elements/image.py b/lib/streamlit/elements/image.py
--- a/lib/streamlit/elements/image.py
+++ b/lib/streamlit/elements/image.py
@@ -49,7 +49,6 @@ def image(
         clamp=False,
         channels="RGB",
         output_format="auto",
-        **kwargs,
     ):
         """Display an image or list of images.
 
@@ -107,14 +106,6 @@ def image(
 
         """
 
-        format = kwargs.get("format")
-        if format != None:
-            # override output compression type if specified
-            output_format = format
-
-            if config.get_option("deprecation.showImageFormat"):
-                self.dg.exception(ImageFormatWarning(format))
-
         if use_column_width == "auto" or (use_column_width is None and width is None):
             width = -3
         elif use_column_width == "always" or use_column_width == True:
@@ -143,26 +134,6 @@ def dg(self) -> "streamlit.delta_generator.DeltaGenerator":
         return cast("streamlit.delta_generator.DeltaGenerator", self)
 
 
-class ImageFormatWarning(StreamlitDeprecationWarning):
-    def __init__(self, format):
-        self.format = format
-
-        super(ImageFormatWarning, self).__init__(
-            msg=self._get_message(), config_option="deprecation.showImageFormat"
-        )
-
-    def _get_message(self):
-        return f"""
-The `format` parameter for `st.image` has been deprecated and will be removed
-on 2020-10-30. We recommend changing to the new `output_format`
-parameter to future-proof your code. For the parameter,
-`format="{self.format}"`, please use `output_format="{self.format}"` instead.
-
-See [https://github.com/streamlit/streamlit/issues/1137](https://github.com/streamlit/streamlit/issues/1137)
-for more information.
-            """
-
-
 def _image_has_alpha_channel(image):
     if image.mode in ("RGBA", "LA") or (
         image.mode == "P" and "transparency" in image.info


Test patch:
diff --git a/lib/tests/streamlit/config_test.py b/lib/tests/streamlit/config_test.py
--- a/lib/tests/streamlit/config_test.py
+++ b/lib/tests/streamlit/config_test.py
@@ -278,7 +278,6 @@ def test_config_option_keys(self):
                 "client.showErrorDetails",
                 "deprecation.showfileUploaderEncoding",
                 "deprecation.showPyplotGlobalUse",
-                "deprecation.showImageFormat",
                 "global.developmentMode",
                 "global.disableWatchdogWarning",
                 "global.logLevel",