def from_image_url(url: str, width: int, height: int) -> str:
	"""
	Generates GIFT text for a URL.

	Parameters
	----------
	url : str
		Input URL.
	width : int
		Desired width of the image.
	height : int
		Desired height of the image.

	Returns
	-------
	out: str
		GIFT-ready text.

	"""

	# either both are set or none
	assert not ((width is not None) ^ (height is not None)), 'both "width" and "height" should be set or none of them'

	# `width` is checked, but `height` could be as well used (at this point either both are set or none)
	if width is not None:

		# notice the space at the beginning
		width_height = f' width="{width}" height="{height}"'

	else:

		width_height = ''

	res = f'<img src="{url}" alt="" role="presentation" class="atto_image_button_text-bottom"{width_height}>'

	for to_be_escaped in [':', '~', '=']:

		res = res.replace(to_be_escaped, '\\' + to_be_escaped)

	return res