def _process_array_content_with_images(self, content: list) -> list:
        """
        Process content array that may contain image_url items.
        Used for messages that already have content in array format.
        """
        if not content or not isinstance(content, list):
            return content

        processed_content = []

        for item in content:
            if isinstance(item, dict):
                if item.get("type") == "image_url":
                    # Process image URL if needed
                    processed_content.append(item)
                elif item.get("type") == "image" and item.get("source"):
                    # Convert Anthropic-style to OpenAI-style
                    source = item.get("source", {})
                    if source.get("type") == "base64" and source.get("data"):
                        # Resize the base64 image data
                        resized_data = resize_base64_image(source.get("data"))

                        media_type = source.get("media_type", "image/jpeg")
                        data_url = f"data:{media_type};base64,{resized_data}"

                        processed_content.append(
                            {
                                "type": "image_url",
                                "image_url": {"url": data_url},
                            }
                        )
                    elif source.get("type") == "url" and source.get("url"):
                        processed_content.append(
                            {
                                "type": "image_url",
                                "image_url": {"url": source.get("url")},
                            }
                        )
                else:
                    # Pass through other types
                    processed_content.append(item)
            else:
                processed_content.append(item)

        return processed_content

        Process content array that may contain image_url items.
        Used for messages that already have content in array format.
        
py/core/providers/llm/openai.py